diff --git a/include/mbedtls/error.h b/include/mbedtls/error.h index 3f0af04da..cff22eaa8 100644 --- a/include/mbedtls/error.h +++ b/include/mbedtls/error.h @@ -132,7 +132,7 @@ void mbedtls_strerror( int errnum, char *buffer, size_t buflen ); * representation. * * This function returns a const pointer to an un-modifiable string. The caller - * must not try to modify the string use it only for logging purposes. + * must not try to modify the string and use it only for logging purposes. * * \param error_code error code * diff --git a/library/error.c b/library/error.c index 200e57977..ee1f8b704 100644 --- a/library/error.c +++ b/library/error.c @@ -219,6 +219,7 @@ const char * mbedtls_high_level_strerr( int error_code ) switch( error_code ) { + /* Begin Auto-Generated Code. */ #if defined(MBEDTLS_CIPHER_C) case -(MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE): error_description = "CIPHER - The selected feature is not available"; @@ -713,6 +714,7 @@ const char * mbedtls_high_level_strerr( int error_code ) error_description = "X509 - A fatal error occurred, eg the chain is too long or the vrfy callback failed"; break; #endif /* MBEDTLS_X509_USE_C || MBEDTLS_X509_CREATE_C */ + /* End Auto-Generated Code. */ default: break; @@ -727,6 +729,7 @@ const char * mbedtls_low_level_strerr( int error_code ) switch( error_code ) { + /* Begin Auto-Generated Code. */ #if defined(MBEDTLS_AES_C) case -(MBEDTLS_ERR_AES_INVALID_KEY_LENGTH): error_description = "AES - Invalid key length"; @@ -1122,6 +1125,7 @@ const char * mbedtls_low_level_strerr( int error_code ) error_description = "XTEA - XTEA hardware accelerator failed"; break; #endif /* MBEDTLS_XTEA_C */ + /* End Auto-Generated Code. */ default: break; diff --git a/scripts/data_files/error.fmt b/scripts/data_files/error.fmt index 4cf3a9d3f..5699d9ea2 100644 --- a/scripts/data_files/error.fmt +++ b/scripts/data_files/error.fmt @@ -48,7 +48,9 @@ const char * mbedtls_high_level_strerr( int error_code ) switch( error_code ) { + /* Begin Auto-Generated Code. */ HIGH_LEVEL_CODE_CHECKS + /* End Auto-Generated Code. */ default: break; @@ -63,7 +65,9 @@ const char * mbedtls_low_level_strerr( int error_code ) switch( error_code ) { + /* Begin Auto-Generated Code. */ LOW_LEVEL_CODE_CHECKS + /* End Auto-Generated Code. */ default: break;