25 #ifndef MBEDTLS_PLATFORM_UTIL_H 26 #define MBEDTLS_PLATFORM_UTIL_H 28 #if !defined(MBEDTLS_CONFIG_FILE) 29 #include "mbedtls/config.h" 31 #include MBEDTLS_CONFIG_FILE 35 #if defined(MBEDTLS_HAVE_TIME_DATE) 36 #include "mbedtls/platform_time.h" 44 #if defined(MBEDTLS_CHECK_PARAMS) 46 #if defined(MBEDTLS_CHECK_PARAMS_ASSERT) 52 #if defined(MBEDTLS_PARAM_FAILED) 58 #define MBEDTLS_PARAM_FAILED_ALT 60 #elif defined(MBEDTLS_CHECK_PARAMS_ASSERT) 61 #define MBEDTLS_PARAM_FAILED( cond ) assert( cond ) 62 #define MBEDTLS_PARAM_FAILED_ALT 65 #define MBEDTLS_PARAM_FAILED( cond ) \ 66 mbedtls_param_failed( #cond, __FILE__, __LINE__ ) 83 void mbedtls_param_failed(
const char *failure_condition,
89 #define MBEDTLS_INTERNAL_VALIDATE_RET( cond, ret ) \ 93 MBEDTLS_PARAM_FAILED( cond ); \ 99 #define MBEDTLS_INTERNAL_VALIDATE( cond ) \ 103 MBEDTLS_PARAM_FAILED( cond ); \ 111 #define MBEDTLS_INTERNAL_VALIDATE_RET( cond, ret ) do { } while( 0 ) 112 #define MBEDTLS_INTERNAL_VALIDATE( cond ) do { } while( 0 ) 117 #if !defined(MBEDTLS_DEPRECATED_REMOVED) 118 #if defined(MBEDTLS_DEPRECATED_WARNING) 123 #define MBEDTLS_DEPRECATED __attribute__((deprecated)) 124 MBEDTLS_DEPRECATED
typedef char const * mbedtls_deprecated_string_constant_t;
125 #define MBEDTLS_DEPRECATED_STRING_CONSTANT( VAL ) \ 126 ( (mbedtls_deprecated_string_constant_t) ( VAL ) ) 127 MBEDTLS_DEPRECATED
typedef int mbedtls_deprecated_numeric_constant_t;
128 #define MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( VAL ) \ 129 ( (mbedtls_deprecated_numeric_constant_t) ( VAL ) ) 130 #undef MBEDTLS_DEPRECATED 132 #define MBEDTLS_DEPRECATED_STRING_CONSTANT( VAL ) VAL 133 #define MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( VAL ) VAL 161 #if defined(MBEDTLS_HAVE_TIME_DATE) 188 struct tm *mbedtls_platform_gmtime_r(
const mbedtls_time_t *tt,