Skip to content

Commit

Permalink
Merge pull request #3176 from aggarg/development
Browse files Browse the repository at this point in the history
Add support for const error description strings
  • Loading branch information
gilles-peskine-arm authored Apr 21, 2020
2 parents e50c6ed + 6ea4fc7 commit dc9c47d
Show file tree
Hide file tree
Showing 4 changed files with 955 additions and 579 deletions.
30 changes: 30 additions & 0 deletions include/mbedtls/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,36 @@ extern "C" {
*/
void mbedtls_strerror( int errnum, char *buffer, size_t buflen );

/**
* \brief Translate the high-level part of an Mbed TLS error code into a string
* representation.
*
* This function returns a const pointer to an un-modifiable string. The caller
* must not try to modify the string. It is intended to be used mostly for
* logging purposes.
*
* \param error_code error code
*
* \return The string representation of the error code, or \c NULL if the error
* code is unknown.
*/
const char * mbedtls_high_level_strerr( int error_code );

/**
* \brief Translate the low-level part of an Mbed TLS error code into a string
* representation.
*
* This function returns a const pointer to an un-modifiable string. The caller
* must not try to modify the string. It is intended to be used mostly for
* logging purposes.
*
* \param error_code error code
*
* \return The string representation of the error code, or \c NULL if the error
* code is unknown.
*/
const char * mbedtls_low_level_strerr( int error_code );

#ifdef __cplusplus
}
#endif
Expand Down
Loading

0 comments on commit dc9c47d

Please sign in to comment.