a9f64006ea
Problem ------- mbedtls_strerror is a utility function which converts an mbedTLS error code into a human readable string. It requires the caller to allocate a buffer every time an error code needs to be converted to a string. It is an overkill and a waste of RAM for resource constrained microcontrollers - where the most common use case is to use these strings for logging. Solution -------- The proposed commit adds two functions: * const char * mbedtls_high_level_strerr( int error_code ); * const char * mbedtls_low_level_strerr( int error_code ); The above two functions convert the high level and low level parts of an mbedTLS error code to human readable strings. They return a const pointer to an unmodifiable string which is not supposed to be modified by the caller and only to be used for logging purposes. The caller no longer needs to allocate a buffer. Backward Compatibility ---------------------- The proposed change is completely backward compatible as it does not change the existing mbedtls_strerror function and ensures that it continues to behave the same way. Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> |
||
---|---|---|
.. | ||
error.fmt | ||
query_config.fmt | ||
rename-1.3-2.0.txt | ||
version_features.fmt | ||
vs6-app-template.dsp | ||
vs6-main-template.dsp | ||
vs6-workspace-template.dsw | ||
vs2010-app-template.vcxproj | ||
vs2010-main-template.vcxproj | ||
vs2010-sln-template.sln |