Add auto-generated code markers

The presence of these markers in the original code was helpful to me in
figuring out that this portion of the code is auto-generated.
Therefore, I think those are useful and should be present.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
Gaurav Aggarwal 2020-04-11 17:14:03 -07:00
parent a4a2aa5169
commit 3d02db23e8
3 changed files with 9 additions and 1 deletions

View File

@ -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
*

View File

@ -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;

View File

@ -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;