mbedtls/scripts/data_files
Gaurav Aggarwal a9f64006ea Add support for const error description strings
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>
2020-04-09 01:44:52 -07:00
..
error.fmt Add support for const error description strings 2020-04-09 01:44:52 -07:00
query_config.fmt Fix check-generated-files.sh failure with query_config 2019-02-07 10:38:23 +00:00
rename-1.3-2.0.txt Rename identifiers containing double-underscore 2020-03-23 17:55:32 +01:00
version_features.fmt Making version features easily ROM-able when using Arm C compiler. 2019-06-12 12:26:37 +02:00
vs6-app-template.dsp Add missing VS project files, generated by script 2013-09-18 14:34:33 +02:00
vs6-main-template.dsp Rename in visual C script and templates 2015-01-26 16:44:38 +00:00
vs6-workspace-template.dsw Add VS6 workspace to update-vs-apps.pl 2014-05-22 13:52:50 +02:00
vs2010-app-template.vcxproj windows: Fix Release x64 configuration 2019-06-20 10:58:50 +01:00
vs2010-main-template.vcxproj Don't hard-code include paths in templates 2020-02-26 14:37:07 +01:00
vs2010-sln-template.sln Rename in visual C script and templates 2015-01-26 16:44:38 +00:00