[mbedtls] fix build

This commit is contained in:
Jonathan Hui
2018-10-31 13:19:34 -07:00
parent c56e5ea0c4
commit 8d02956c36
7 changed files with 25 additions and 1 deletions
+1
View File
@@ -193,6 +193,7 @@ LOCAL_SRC_FILES := \
third_party/mbedtls/repo/library/md_wrap.c \
third_party/mbedtls/repo/library/memory_buffer_alloc.c \
third_party/mbedtls/repo/library/platform.c \
third_party/mbedtls/repo/library/platform_util.c \
third_party/mbedtls/repo/library/sha256.c \
third_party/mbedtls/repo/library/bignum.c \
third_party/mbedtls/repo/library/ccm.c \
+1
View File
@@ -71,6 +71,7 @@
<ClCompile Include="..\..\third_party\mbedtls\repo\library\md_wrap.c" />
<ClCompile Include="..\..\third_party\mbedtls\repo\library\memory_buffer_alloc.c" />
<ClCompile Include="..\..\third_party\mbedtls\repo\library\platform.c" />
<ClCompile Include="..\..\third_party\mbedtls\repo\library\platform_util.c" />
<ClCompile Include="..\..\third_party\mbedtls\repo\library\sha256.c" />
<ClCompile Include="..\..\third_party\mbedtls\repo\library\ssl_ciphersuites.c" />
<ClCompile Include="..\..\third_party\mbedtls\repo\library\ssl_cli.c" />
@@ -64,6 +64,9 @@
<ClCompile Include="..\..\third_party\mbedtls\repo\library\platform.c">
<Filter>Source Files\repo\library</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\mbedtls\repo\library\platform_util.c">
<Filter>Source Files\repo\library</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\mbedtls\repo\library\sha256.c">
<Filter>Source Files\repo\library</Filter>
</ClCompile>
+1
View File
@@ -74,6 +74,7 @@
<ClCompile Include="..\..\third_party\mbedtls\repo\library\md_wrap.c" />
<ClCompile Include="..\..\third_party\mbedtls\repo\library\memory_buffer_alloc.c" />
<ClCompile Include="..\..\third_party\mbedtls\repo\library\platform.c" />
<ClCompile Include="..\..\third_party\mbedtls\repo\library\platform_util.c" />
<ClCompile Include="..\..\third_party\mbedtls\repo\library\sha256.c" />
<ClCompile Include="..\..\third_party\mbedtls\repo\library\ssl_ciphersuites.c" />
<ClCompile Include="..\..\third_party\mbedtls\repo\library\ssl_cli.c" />
@@ -64,6 +64,9 @@
<ClCompile Include="..\..\third_party\mbedtls\repo\library\platform.c">
<Filter>Source Files\repo\library</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\mbedtls\repo\library\platform_util.c">
<Filter>Source Files\repo\library</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\mbedtls\repo\library\sha256.c">
<Filter>Source Files\repo\library</Filter>
</ClCompile>
+1
View File
@@ -67,6 +67,7 @@ libmbedcrypto_a_SOURCES = \
repo/library/pk_wrap.c \
repo/library/pkparse.c \
repo/library/platform.c \
repo/library/platform_util.c \
repo/library/sha256.c \
repo/library/ssl_cookie.c \
repo/library/ssl_ciphersuites.c \
+15 -1
View File
@@ -54,7 +54,21 @@ __inline int windows_kernel_snprintf(char * s, size_t n, const char * format, ..
va_end( argp );
return ret;
}
#define MBEDTLS_PLATFORM_STD_SNPRINTF windows_kernel_snprintf
#define MBEDTLS_PLATFORM_STD_SNPRINTF windows_kernel_snprintf
#define MBEDTLS_PLATFORM_ZEROIZE_ALT
__inline void mbedtls_platform_zeroize( void *buf, size_t len)
{
uint8_t *p = (uint8_t *)buf;
while ( len-- )
{
*p++ = 0;
}
}
#endif
#ifndef _WIN32
#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf
#endif
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) && !defined(_KERNEL_MODE)