22 #ifndef MBEDTLS_ERROR_H
23 #define MBEDTLS_ERROR_H
29 #if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
30 !defined(inline) && !defined(__cplusplus)
31 #define inline __inline
112 #define MBEDTLS_ERR_ERROR_GENERIC_ERROR -0x0001
114 #define MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED -0x006E
117 #define MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED -0x0070
119 #define MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED -0x0072
127 #define MBEDTLS_ERROR_ADD( high, low ) \
128 mbedtls_error_add( high, low, __FILE__, __LINE__ )
130 #if defined(MBEDTLS_TEST_HOOKS)
157 const char *file,
int line )
159 #if defined(MBEDTLS_TEST_HOOKS)
161 ( *mbedtls_test_hook_error_add )( high, low, file, line );
166 return( high + low );
void(* mbedtls_test_hook_error_add)(int, int, const char *, int)
Testing hook called before adding/combining two error codes together. Only used when invasive testing...
void mbedtls_strerror(int errnum, char *buffer, size_t buflen)
Translate a mbed TLS error code into a string representation, Result is truncated if necessary and al...
static int mbedtls_error_add(int high, int low, const char *file, int line)
Combines a high-level and low-level error code together.
const char * mbedtls_high_level_strerr(int error_code)
Translate the high-level part of an Mbed TLS error code into a string representation.
Build-time configuration info.
const char * mbedtls_low_level_strerr(int error_code)
Translate the low-level part of an Mbed TLS error code into a string representation.