Merge branch 'iotssl-841-platform-time'
Conflicts: include/mbedtls/platform.h
This commit is contained in:
commit
4dcae421a9
13 changed files with 13 additions and 20 deletions
|
@ -30,10 +30,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_HAVE_TIME)
|
#if defined(MBEDTLS_HAVE_TIME)
|
||||||
#include "platform_time.h"
|
#include "mbedtls/platform_time.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
#include "mbedtls/platform.h"
|
#include "mbedtls/platform.h"
|
||||||
#else
|
#else
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#define mbedtls_time_t time_t
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "mbedtls/net.h"
|
#include "mbedtls/net.h"
|
||||||
|
|
|
@ -190,6 +190,8 @@ int mbedtls_platform_set_exit( void (*exit_func)( int status ) )
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_PLATFORM_EXIT_ALT */
|
#endif /* MBEDTLS_PLATFORM_EXIT_ALT */
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_HAVE_TIME)
|
||||||
|
|
||||||
#if defined(MBEDTLS_PLATFORM_TIME_ALT)
|
#if defined(MBEDTLS_PLATFORM_TIME_ALT)
|
||||||
#if !defined(MBEDTLS_PLATFORM_STD_TIME)
|
#if !defined(MBEDTLS_PLATFORM_STD_TIME)
|
||||||
/*
|
/*
|
||||||
|
@ -213,6 +215,8 @@ int mbedtls_platform_set_time( mbedtls_time_t (*time_func)( mbedtls_time_t* time
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_PLATFORM_TIME_ALT */
|
#endif /* MBEDTLS_PLATFORM_TIME_ALT */
|
||||||
|
|
||||||
|
#endif /* MBEDTLS_HAVE_TIME */
|
||||||
|
|
||||||
#if defined(MBEDTLS_ENTROPY_NV_SEED)
|
#if defined(MBEDTLS_ENTROPY_NV_SEED)
|
||||||
#if !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) && defined(MBEDTLS_FS_IO)
|
#if !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) && defined(MBEDTLS_FS_IO)
|
||||||
/* Default implementations for the platform independent seed functions use
|
/* Default implementations for the platform independent seed functions use
|
||||||
|
|
|
@ -37,8 +37,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#define mbedtls_calloc calloc
|
#define mbedtls_calloc calloc
|
||||||
#define mbedtls_free free
|
#define mbedtls_free free
|
||||||
#define mbedtls_time time
|
|
||||||
#define mbedtls_time_t time_t
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "mbedtls/ssl_cache.h"
|
#include "mbedtls/ssl_cache.h"
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include "mbedtls/platform.h"
|
#include "mbedtls/platform.h"
|
||||||
#else
|
#else
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#define mbedtls_time_t time_t
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "mbedtls/ssl_ciphersuites.h"
|
#include "mbedtls/ssl_ciphersuites.h"
|
||||||
|
|
|
@ -33,8 +33,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#define mbedtls_calloc calloc
|
#define mbedtls_calloc calloc
|
||||||
#define mbedtls_free free
|
#define mbedtls_free free
|
||||||
#define mbedtls_time time
|
|
||||||
#define mbedtls_time_t time_t
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "mbedtls/debug.h"
|
#include "mbedtls/debug.h"
|
||||||
|
@ -46,7 +44,7 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#if defined(MBEDTLS_HAVE_TIME)
|
#if defined(MBEDTLS_HAVE_TIME)
|
||||||
#include <time.h>
|
#include "mbedtls/platform_time.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
||||||
|
|
|
@ -36,8 +36,6 @@
|
||||||
#else
|
#else
|
||||||
#define mbedtls_calloc calloc
|
#define mbedtls_calloc calloc
|
||||||
#define mbedtls_free free
|
#define mbedtls_free free
|
||||||
#define mbedtls_time time
|
|
||||||
#define mbedtls_time_t time_t
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "mbedtls/ssl_cookie.h"
|
#include "mbedtls/ssl_cookie.h"
|
||||||
|
|
|
@ -33,8 +33,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#define mbedtls_calloc calloc
|
#define mbedtls_calloc calloc
|
||||||
#define mbedtls_free free
|
#define mbedtls_free free
|
||||||
#define mbedtls_time time
|
|
||||||
#define mbedtls_time_t time_t
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "mbedtls/debug.h"
|
#include "mbedtls/debug.h"
|
||||||
|
@ -48,7 +46,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_HAVE_TIME)
|
#if defined(MBEDTLS_HAVE_TIME)
|
||||||
#include <time.h>
|
#include "mbedtls/platform_time.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
||||||
|
|
|
@ -33,8 +33,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#define mbedtls_calloc calloc
|
#define mbedtls_calloc calloc
|
||||||
#define mbedtls_free free
|
#define mbedtls_free free
|
||||||
#define mbedtls_time time
|
|
||||||
#define mbedtls_time_t time_t
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "mbedtls/ssl_ticket.h"
|
#include "mbedtls/ssl_ticket.h"
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#define mbedtls_calloc calloc
|
#define mbedtls_calloc calloc
|
||||||
#define mbedtls_free free
|
#define mbedtls_free free
|
||||||
#define mbedtls_time_t time_t
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "mbedtls/debug.h"
|
#include "mbedtls/debug.h"
|
||||||
|
|
|
@ -55,12 +55,15 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#define mbedtls_free free
|
#define mbedtls_free free
|
||||||
#define mbedtls_calloc calloc
|
#define mbedtls_calloc calloc
|
||||||
#define mbedtls_time time
|
|
||||||
#define mbedtls_time_t time_t
|
|
||||||
#define mbedtls_printf printf
|
#define mbedtls_printf printf
|
||||||
#define mbedtls_snprintf snprintf
|
#define mbedtls_snprintf snprintf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_HAVE_TIME)
|
||||||
|
#include "mbedtls/platform_time.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
|
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#define mbedtls_printf printf
|
#define mbedtls_printf printf
|
||||||
#define mbedtls_fprintf fprintf
|
#define mbedtls_fprintf fprintf
|
||||||
#define mbedtls_time_t time_t
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(MBEDTLS_SSL_CLI_C) || !defined(MBEDTLS_SSL_PROTO_DTLS) || \
|
#if !defined(MBEDTLS_SSL_CLI_C) || !defined(MBEDTLS_SSL_PROTO_DTLS) || \
|
||||||
|
|
|
@ -231,6 +231,7 @@ scripts/config.pl unset MBEDTLS_PLATFORM_MEMORY
|
||||||
scripts/config.pl unset MBEDTLS_PLATFORM_PRINTF_ALT
|
scripts/config.pl unset MBEDTLS_PLATFORM_PRINTF_ALT
|
||||||
scripts/config.pl unset MBEDTLS_PLATFORM_FPRINTF_ALT
|
scripts/config.pl unset MBEDTLS_PLATFORM_FPRINTF_ALT
|
||||||
scripts/config.pl unset MBEDTLS_PLATFORM_SNPRINTF_ALT
|
scripts/config.pl unset MBEDTLS_PLATFORM_SNPRINTF_ALT
|
||||||
|
scripts/config.pl unset MBEDTLS_PLATFORM_TIME_ALT
|
||||||
scripts/config.pl unset MBEDTLS_PLATFORM_EXIT_ALT
|
scripts/config.pl unset MBEDTLS_PLATFORM_EXIT_ALT
|
||||||
scripts/config.pl unset MBEDTLS_ENTROPY_NV_SEED
|
scripts/config.pl unset MBEDTLS_ENTROPY_NV_SEED
|
||||||
scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
|
scripts/config.pl unset MBEDTLS_MEMORY_BUFFER_ALLOC_C
|
||||||
|
|
Loading…
Reference in a new issue