Skip to content
Permalink
Browse files

Externals: Update mbedtls to 2.16.1

On a few of our buildbot instances, we get warnings about the usage of
deprecated functions. We should correct these, especially if we're
delegating to system versions of the libraries if they're available.
However, in order to do that, we need to update our library variant from
2.1.1 so that the non-deprecated alternatives are actually available.
  • Loading branch information...
lioncash committed Jun 8, 2019
1 parent e73a3ba commit 3053fea160a3675a7b332edfed6bba80c6961bb6
Showing with 34,514 additions and 8,571 deletions.
  1. +19 −7 Externals/mbedtls/CMakeLists.txt
  2. +16 −0 Externals/mbedtls/include/CMakeLists.txt
  3. +533 −156 Externals/mbedtls/include/mbedtls/aes.h
  4. +40 −13 Externals/mbedtls/include/mbedtls/aesni.h
  5. +49 −16 Externals/mbedtls/include/mbedtls/arc4.h
  6. +370 −0 Externals/mbedtls/include/mbedtls/aria.h
  7. +18 −2 Externals/mbedtls/include/mbedtls/asn1.h
  8. +204 −115 Externals/mbedtls/include/mbedtls/asn1write.h
  9. +11 −1 Externals/mbedtls/include/mbedtls/base64.h
  10. +582 −338 Externals/mbedtls/include/mbedtls/bignum.h
  11. +143 −59 Externals/mbedtls/include/mbedtls/blowfish.h
  12. +51 −21 Externals/mbedtls/include/mbedtls/bn_mul.h
  13. +173 −82 Externals/mbedtls/include/mbedtls/camellia.h
  14. +229 −60 Externals/mbedtls/include/mbedtls/ccm.h
  15. +8 −1 Externals/mbedtls/include/mbedtls/certs.h
  16. +226 −0 Externals/mbedtls/include/mbedtls/chacha20.h
  17. +358 −0 Externals/mbedtls/include/mbedtls/chachapoly.h
  18. +72 −2 Externals/mbedtls/include/mbedtls/check_config.h
  19. +546 −383 Externals/mbedtls/include/mbedtls/cipher.h
  20. +17 −1 Externals/mbedtls/include/mbedtls/cipher_internal.h
  21. +115 −68 Externals/mbedtls/include/mbedtls/cmac.h
  22. +11 −114 Externals/mbedtls/include/mbedtls/compat-1.3.h
  23. +765 −71 Externals/mbedtls/include/mbedtls/config.h
  24. +207 −117 Externals/mbedtls/include/mbedtls/ctr_drbg.h
  25. +38 −1 Externals/mbedtls/include/mbedtls/debug.h
  26. +66 −16 Externals/mbedtls/include/mbedtls/des.h
  27. +973 −182 Externals/mbedtls/include/mbedtls/dhm.h
  28. +322 −96 Externals/mbedtls/include/mbedtls/ecdh.h
  29. +407 −110 Externals/mbedtls/include/mbedtls/ecdsa.h
  30. +101 −62 Externals/mbedtls/include/mbedtls/ecjpake.h
  31. +827 −364 Externals/mbedtls/include/mbedtls/ecp.h
  32. +299 −0 Externals/mbedtls/include/mbedtls/ecp_internal.h
  33. +6 −4 Externals/mbedtls/include/mbedtls/entropy.h
  34. +2 −1 Externals/mbedtls/include/mbedtls/entropy_poll.h
  35. +42 −20 Externals/mbedtls/include/mbedtls/error.h
  36. +200 −94 Externals/mbedtls/include/mbedtls/gcm.h
  37. +9 −2 Externals/mbedtls/include/mbedtls/havege.h
  38. +141 −0 Externals/mbedtls/include/mbedtls/hkdf.h
  39. +39 −4 Externals/mbedtls/include/mbedtls/hmac_drbg.h
  40. +276 −162 Externals/mbedtls/include/mbedtls/md.h
  41. +190 −20 Externals/mbedtls/include/mbedtls/md2.h
  42. +195 −20 Externals/mbedtls/include/mbedtls/md4.h
  43. +195 −20 Externals/mbedtls/include/mbedtls/md5.h
  44. +8 −7 Externals/mbedtls/include/mbedtls/md_internal.h
  45. +2 −1 Externals/mbedtls/include/mbedtls/memory_buffer_alloc.h
  46. +10 −4 Externals/mbedtls/include/mbedtls/net.h
  47. +50 −4 Externals/mbedtls/include/mbedtls/net_sockets.h
  48. +184 −0 Externals/mbedtls/include/mbedtls/nist_kw.h
  49. +41 −6 Externals/mbedtls/include/mbedtls/oid.h
  50. +30 −11 Externals/mbedtls/include/mbedtls/padlock.h
  51. +9 −2 Externals/mbedtls/include/mbedtls/pem.h
  52. +184 −53 Externals/mbedtls/include/mbedtls/pk.h
  53. +26 −2 Externals/mbedtls/include/mbedtls/pk_internal.h
  54. +4 −2 Externals/mbedtls/include/mbedtls/pkcs11.h
  55. +12 −1 Externals/mbedtls/include/mbedtls/pkcs12.h
  56. +16 −1 Externals/mbedtls/include/mbedtls/pkcs5.h
  57. +110 −38 Externals/mbedtls/include/mbedtls/platform.h
  58. +2 −1 Externals/mbedtls/include/mbedtls/platform_time.h
  59. +185 −0 Externals/mbedtls/include/mbedtls/platform_util.h
  60. +192 −0 Externals/mbedtls/include/mbedtls/poly1305.h
  61. +122 −23 Externals/mbedtls/include/mbedtls/ripemd160.h
  62. +982 −363 Externals/mbedtls/include/mbedtls/rsa.h
  63. +226 −0 Externals/mbedtls/include/mbedtls/rsa_internal.h
  64. +263 −47 Externals/mbedtls/include/mbedtls/sha1.h
  65. +207 −51 Externals/mbedtls/include/mbedtls/sha256.h
  66. +212 −53 Externals/mbedtls/include/mbedtls/sha512.h
  67. +824 −120 Externals/mbedtls/include/mbedtls/ssl.h
  68. +8 −1 Externals/mbedtls/include/mbedtls/ssl_cache.h
  69. +221 −2 Externals/mbedtls/include/mbedtls/ssl_ciphersuites.h
  70. +9 −2 Externals/mbedtls/include/mbedtls/ssl_cookie.h
  71. +308 −26 Externals/mbedtls/include/mbedtls/ssl_internal.h
  72. +10 −3 Externals/mbedtls/include/mbedtls/ssl_ticket.h
  73. +18 −2 Externals/mbedtls/include/mbedtls/threading.h
  74. +34 −22 Externals/mbedtls/include/mbedtls/timing.h
  75. +6 −5 Externals/mbedtls/include/mbedtls/version.h
  76. +13 −7 Externals/mbedtls/include/mbedtls/x509.h
  77. +2 −1 Externals/mbedtls/include/mbedtls/x509_crl.h
  78. +161 −30 Externals/mbedtls/include/mbedtls/x509_crt.h
  79. +10 −1 Externals/mbedtls/include/mbedtls/x509_csr.h
  80. +16 −16 Externals/mbedtls/include/mbedtls/xtea.h
  81. +32 −7 Externals/mbedtls/library/CMakeLists.txt
  82. +62 −28 Externals/mbedtls/library/Makefile
  83. +902 −187 Externals/mbedtls/library/aes.c
  84. +6 −0 Externals/mbedtls/library/aesni.c
  85. +2 −6 Externals/mbedtls/library/arc4.c
  86. +1,079 −0 Externals/mbedtls/library/aria.c
  87. +3 −7 Externals/mbedtls/library/asn1parse.c
  88. +62 −31 Externals/mbedtls/library/asn1write.c
  89. +5 −1 Externals/mbedtls/library/base64.c
  90. +441 −133 Externals/mbedtls/library/bignum.c
  91. +52 −12 Externals/mbedtls/library/blowfish.c
  92. +59 −17 Externals/mbedtls/library/camellia.c
  93. +96 −21 Externals/mbedtls/library/ccm.c
  94. +101 −46 Externals/mbedtls/library/certs.c
  95. +570 −0 Externals/mbedtls/library/chacha20.c
  96. +540 −0 Externals/mbedtls/library/chachapoly.c
  97. +308 −61 Externals/mbedtls/library/cipher.c
  98. +824 −3 Externals/mbedtls/library/cipher_wrap.c
  99. +38 −33 Externals/mbedtls/library/cmac.c
  100. +185 −57 Externals/mbedtls/library/ctr_drbg.c
  101. +52 −2 Externals/mbedtls/library/debug.c
  102. +7 −11 Externals/mbedtls/library/des.c
  103. +95 −26 Externals/mbedtls/library/dhm.c
  104. +462 −73 Externals/mbedtls/library/ecdh.c
  105. +515 −64 Externals/mbedtls/library/ecdsa.c
  106. +40 −3 Externals/mbedtls/library/ecjpake.c
  107. +1,075 −178 Externals/mbedtls/library/ecp.c
  108. +148 −5 Externals/mbedtls/library/ecp_curves.c
  109. +111 −45 Externals/mbedtls/library/entropy.c
  110. +18 −50 Externals/mbedtls/library/entropy_poll.c
  111. +227 −18 Externals/mbedtls/library/error.c
  112. +153 −111 Externals/mbedtls/library/gcm.c
  113. +2 −6 Externals/mbedtls/library/havege.c
  114. +192 −0 Externals/mbedtls/library/hkdf.c
  115. +93 −42 Externals/mbedtls/library/hmac_drbg.c
  116. +62 −58 Externals/mbedtls/library/md.c
  117. +102 −27 Externals/mbedtls/library/md2.c
  118. +112 −28 Externals/mbedtls/library/md4.c
  119. +131 −40 Externals/mbedtls/library/md5.c
  120. +91 −80 Externals/mbedtls/library/md_wrap.c
  121. +28 −23 Externals/mbedtls/library/memory_buffer_alloc.c
  122. +95 −12 Externals/mbedtls/library/net_sockets.c
  123. +755 −0 Externals/mbedtls/library/nist_kw.c
  124. +45 −0 Externals/mbedtls/library/oid.c
  125. +105 −62 Externals/mbedtls/library/pem.c
  126. +199 −27 Externals/mbedtls/library/pk.c
  127. +244 −20 Externals/mbedtls/library/pk_wrap.c
  128. +11 −11 Externals/mbedtls/library/pkcs12.c
  129. +8 −3 Externals/mbedtls/library/pkcs5.c
  130. +275 −86 Externals/mbedtls/library/pkparse.c
  131. +124 −18 Externals/mbedtls/library/pkwrite.c
  132. +52 −11 Externals/mbedtls/library/platform.c
  133. +136 −0 Externals/mbedtls/library/platform_util.c
  134. +559 −0 Externals/mbedtls/library/poly1305.c
  135. +125 −40 Externals/mbedtls/library/ripemd160.c
  136. +1,407 −417 Externals/mbedtls/library/rsa.c
  137. +492 −0 Externals/mbedtls/library/rsa_internal.c
  138. +165 −42 Externals/mbedtls/library/sha1.c
  139. +171 −44 Externals/mbedtls/library/sha256.c
  140. +169 −48 Externals/mbedtls/library/sha512.c
  141. +2 −1 Externals/mbedtls/library/ssl_cache.c
  142. +538 −22 Externals/mbedtls/library/ssl_ciphersuites.c
  143. +504 −273 Externals/mbedtls/library/ssl_cli.c
  144. +4 −8 Externals/mbedtls/library/ssl_cookie.c
  145. +842 −389 Externals/mbedtls/library/ssl_srv.c
  146. +11 −15 Externals/mbedtls/library/ssl_ticket.c
  147. +3,042 −934 Externals/mbedtls/library/ssl_tls.c
  148. +51 −1 Externals/mbedtls/library/threading.c
  149. +78 −66 Externals/mbedtls/library/timing.c
  150. +1 −1 Externals/mbedtls/library/version.c
  151. +135 −3 Externals/mbedtls/library/version_features.c
  152. +108 −107 Externals/mbedtls/library/x509.c
  153. +105 −66 Externals/mbedtls/library/x509_create.c
  154. +73 −22 Externals/mbedtls/library/x509_crl.c
  155. +807 −468 Externals/mbedtls/library/x509_crt.c
  156. +31 −35 Externals/mbedtls/library/x509_csr.c
  157. +96 −43 Externals/mbedtls/library/x509write_crt.c
  158. +48 −17 Externals/mbedtls/library/x509write_csr.c
  159. +2 −6 Externals/mbedtls/library/xtea.c
  160. +8 −0 Externals/mbedtls/mbedTLS.vcxproj
@@ -7,7 +7,7 @@ set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}

string(REGEX MATCH "Clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER_ID}")

if(CMAKE_COMPILER_IS_GNUCC)
if(CMAKE_COMPILER_IS_GNU)
# 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
@@ -26,23 +26,35 @@ if(CMAKE_COMPILER_IS_GNUCC)
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)
endif(CMAKE_COMPILER_IS_GNU)

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_ASAN "-Werror -fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -O3")
set(CMAKE_C_FLAGS_ASANDBG "-Werror -fsanitize=address -fno-common -fsanitize=undefined -fno-sanitize-recover=all -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_COMPILER_IS_IAR)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --warn_about_c_style_casts --warnings_are_errors -Ohz")
endif(CMAKE_COMPILER_IS_IAR)

if(CMAKE_COMPILER_IS_MSVC)
# Strictest warnings, and treat as errors
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
endif(CMAKE_COMPILER_IS_MSVC)

if(CMAKE_BUILD_TYPE STREQUAL "Coverage")
if(CMAKE_COMPILER_IS_GNU OR CMAKE_COMPILER_IS_CLANG)
set(CMAKE_SHARED_LINKER_FLAGS "--coverage")
endif(CMAKE_COMPILER_IS_GNU OR CMAKE_COMPILER_IS_CLANG)
endif(CMAKE_BUILD_TYPE STREQUAL "Coverage")

if(LIB_INSTALL_DIR)
else()
@@ -0,0 +1,16 @@
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)

# Make config.h available in an out-of-source build. ssl-opt.sh requires it.
if (NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
link_to_source(mbedtls)
endif()

0 comments on commit 3053fea

Please sign in to comment.
You can’t perform that action at this time.