Fix defender demo / fix mbedtls config to use threading alt.

This commit is contained in:
Jason Carroll
2022-11-07 04:21:52 -08:00
parent 86ba1da540
commit c8f58f0394
4 changed files with 7 additions and 8 deletions

View File

@@ -86,7 +86,7 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;MBEDTLS_CONFIG_FILE="medtls_config_v3.2.1.h";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>.\;..\..\Mqtt_Demo_Helpers;..\..\..\..\Source\Application-Protocols\network_transport;..\..\..\..\Source\Utilities\backoff_algorithm\source\include;..\..\..\..\Source\Application-Protocols\network_transport\sockets_wrapper\freertos_plus_tcp;..\..\..\..\Source\AWS\device-defender\source\include;..\..\..\..\Source\coreJSON\source\include;..\..\..\..\Source\Application-Protocols\coreMQTT\source\include;..\..\..\..\Source\Application-Protocols\coreMQTT\source\interface;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>

View File

@@ -197,10 +197,10 @@ static eReportBuilderStatus prvWriteTaskIdArray( char * pcBuffer,
/*-----------------------------------------------------------*/
static eReportBuilderStatus prvWritePortsArray( char * pcBuffer,
uint32_t xBufferLength,
size_t xBufferLength,
const uint16_t * pusOpenPortsArray,
uint32_t xOpenPortsArrayLength,
uint32_t * pxOutCharsWritten )
size_t xOpenPortsArrayLength,
size_t * pxOutCharsWritten )
{
char * pcCurrentWritePos = pcBuffer;
uint32_t i;
@@ -435,7 +435,7 @@ eReportBuilderStatus eGenerateJsonReport( char * pcBuffer,
{
char * pcCurrentWritePos = pcBuffer;
size_t xRemainingBufferLength = xBufferLength;
uint32_t bufferWritten;
size_t bufferWritten;
eReportBuilderStatus eStatus = eReportBuilderSuccess;
int32_t lCharactersWritten;

View File

@@ -83,6 +83,7 @@ extern void vLoggingPrintf( const char * pcFormatString,
#include "mbedtls/threading.h"
#include "mbedtls/x509.h"
#include "mbedtls/error.h"
#include "mbedtls/build_info.h"
/**
* @brief Secured connection context.

View File

@@ -1750,7 +1750,7 @@ void mbedtls_platform_free( void * ptr );
*
* Uncomment this to allow your own alternate threading implementation.
*/
//#define MBEDTLS_THREADING_ALT
#define MBEDTLS_THREADING_ALT
/**
* \def MBEDTLS_THREADING_PTHREAD
@@ -3064,8 +3064,6 @@ void mbedtls_platform_free( void * ptr );
* Enable this layer to allow use of mutexes within mbed TLS
*/
#define MBEDTLS_THREADING_C
#define MBEDTLS_THREADING_IMPL
#include "mbedtls_freertos_port.h"
/**
* \def MBEDTLS_TIMING_C