00001
00023 #ifndef MBEDTLS_PLATFORM_TIME_H
00024 #define MBEDTLS_PLATFORM_TIME_H
00025
00026 #if !defined(MBEDTLS_CONFIG_FILE)
00027 #include "config.h"
00028 #else
00029 #include MBEDTLS_CONFIG_FILE
00030 #endif
00031
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035
00044
00045
00046
00047 #if defined(MBEDTLS_PLATFORM_TIME_TYPE_MACRO)
00048 typedef MBEDTLS_PLATFORM_TIME_TYPE_MACRO mbedtls_time_t;
00049 #else
00050
00051 #include <time.h>
00052 typedef time_t mbedtls_time_t;
00053 #endif
00054
00055
00056
00057
00058 #if defined(MBEDTLS_PLATFORM_TIME_ALT)
00059 extern mbedtls_time_t (*mbedtls_time)( mbedtls_time_t* time );
00060
00068 int mbedtls_platform_set_time( mbedtls_time_t (*time_func)( mbedtls_time_t* time ) );
00069 #else
00070 #if defined(MBEDTLS_PLATFORM_TIME_MACRO)
00071 #define mbedtls_time MBEDTLS_PLATFORM_TIME_MACRO
00072 #else
00073 #define mbedtls_time time
00074 #endif
00075 #endif
00076
00077 #ifdef __cplusplus
00078 }
00079 #endif
00080
00081 #endif