00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef MBEDTLS_PLATFORM_TIME_H
00025 #define MBEDTLS_PLATFORM_TIME_H
00026
00027 #if !defined(MBEDTLS_CONFIG_FILE)
00028 #include "config.h"
00029 #else
00030 #include MBEDTLS_CONFIG_FILE
00031 #endif
00032
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036
00045
00046
00047
00048 #if defined(MBEDTLS_PLATFORM_TIME_TYPE_MACRO)
00049 typedef MBEDTLS_PLATFORM_TIME_TYPE_MACRO mbedtls_time_t;
00050 #else
00051
00052 #include <time.h>
00053 typedef time_t mbedtls_time_t;
00054 #endif
00055
00056
00057
00058
00059 #if defined(MBEDTLS_PLATFORM_TIME_ALT)
00060 extern mbedtls_time_t (*mbedtls_time)( mbedtls_time_t* time );
00061
00069 int mbedtls_platform_set_time( mbedtls_time_t (*time_func)( mbedtls_time_t* time ) );
00070 #else
00071 #if defined(MBEDTLS_PLATFORM_TIME_MACRO)
00072 #define mbedtls_time MBEDTLS_PLATFORM_TIME_MACRO
00073 #else
00074 #define mbedtls_time time
00075 #endif
00076 #endif
00077
00078 #ifdef __cplusplus
00079 }
00080 #endif
00081
00082 #endif