mbedtls/include/mbedtls
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
..
aes.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
aesni.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
arc4.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
aria.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
asn1.h Revert "asn1: Remove dependency on X.509" 2020-03-19 14:23:45 +01:00
asn1write.h Add ASN.1 ENUMERATED tag support 2019-10-31 19:17:26 +02:00
base64.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
bignum.h Bignum: Document assumptions about the sign field 2019-11-04 10:39:20 +00:00
blowfish.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
bn_mul.h Fix -O0 build for Aarch64 bignum multiplication. 2019-09-02 13:44:57 +02:00
camellia.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
ccm.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
certs.h Revert "Remove certs.h" 2020-03-04 15:39:14 +01:00
chacha20.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
chachapoly.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
check_config.h Add additional sanity checks to check_config.h 2020-03-27 17:16:15 +00:00
cipher.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
cipher_internal.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
cmac.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
compat-1.3.h Rename identifiers containing double-underscore 2020-03-23 17:55:32 +01:00
config.h Update references from drafts to RFCs in config.h 2020-03-25 10:34:39 +01:00
ctr_drbg.h ctr_drbg: Clarify reseed_counter values before seeding 2020-01-09 13:48:52 +00:00
debug.h Revert "Remove unused TLS, NET, and X.509 files" 2020-03-19 13:36:33 +01:00
des.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
dhm.h DHM functions are not part of x509 2020-03-19 14:23:45 +01:00
ecdh.h Add mbedtls_ecdh_can_do 2019-08-19 13:37:46 +01:00
ecdsa.h ECDSA: Explain limitations of constant blinding 2019-09-05 11:18:58 +01:00
ecjpake.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
ecp.h Revert "ecp: Remove dependency on TLS and X.509" 2020-03-19 14:23:45 +01:00
ecp_internal.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
entropy.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
entropy_poll.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
error.h Add support for const error description strings 2020-04-09 01:44:52 -07:00
gcm.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
havege.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
hkdf.h Merge pull request #196 from RonEld/fix_license_header 2019-08-16 09:26:41 +01:00
hmac_drbg.h fixup! HMAC_DRBG: support set_entropy_len() before seed() 2019-10-23 19:46:55 +02:00
md.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
md2.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
md4.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
md5.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
md_internal.h Implement NO_SHA384 in MD layer and PSA 2020-01-06 11:40:23 +01:00
memory_buffer_alloc.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
net.h Revert "Remove unused TLS, NET, and X.509 files" 2020-03-19 13:36:33 +01:00
net_sockets.h Revert "Remove unused TLS, NET, and X.509 files" 2020-03-19 13:36:33 +01:00
nist_kw.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
oid.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
padlock.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
pem.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
pk.h Rename some signature-related identifiers 2019-11-26 18:20:59 +01:00
pk_internal.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
pkcs5.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
pkcs11.h Revert "Remove unused TLS, NET, and X.509 files" 2020-03-19 13:36:33 +01:00
pkcs12.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
platform.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
platform_time.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
platform_util.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
poly1305.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
psa_util.h Change auxiliary functions for TLS to the new PSA EC curve encoding 2020-01-31 10:24:21 +01:00
ripemd160.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
rsa.h Add documentation notes about the required size of the signature buffers 2019-11-13 12:15:35 +01:00
rsa_internal.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
sha1.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
sha256.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
sha512.h Improve doxygen formatting 2020-01-24 10:57:25 +01:00
ssl.h Merge 'mbedtls/development' into merge-crypto-unremoved-20200304 2020-03-23 18:02:07 +01:00
ssl_cache.h Revert "Remove unused TLS, NET, and X.509 files" 2020-03-19 13:36:33 +01:00
ssl_ciphersuites.h Rename identifiers containing double-underscore 2020-03-23 17:55:32 +01:00
ssl_cookie.h Revert "Remove unused TLS, NET, and X.509 files" 2020-03-19 13:36:33 +01:00
ssl_internal.h Merge 'mbedtls/development' into merge-crypto-unremoved-20200304 2020-03-23 18:02:07 +01:00
ssl_ticket.h Revert "Remove unused TLS, NET, and X.509 files" 2020-03-19 13:36:33 +01:00
threading.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
timing.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00
version.h Bump version to Mbed TLS 2.21.0 2020-02-19 14:35:16 +00:00
x509.h Revert "Remove unused TLS, NET, and X.509 files" 2020-03-19 13:36:33 +01:00
x509_crl.h Revert "Remove unused TLS, NET, and X.509 files" 2020-03-19 13:36:33 +01:00
x509_crt.h Revert "Remove unused TLS, NET, and X.509 files" 2020-03-19 13:36:33 +01:00
x509_csr.h Revert "Remove unused TLS, NET, and X.509 files" 2020-03-19 13:36:33 +01:00
xtea.h Remove files sourced from Mbed Crypto 2019-08-15 15:44:50 +01:00