Address review comments
1. The functions mbedtls_high_level_strerr and mbedtls_low_level_strerr
accept any error code and extract the high-level and low-level parts
respectively.
2. Documentation updates.
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
diff --git a/include/mbedtls/error.h b/include/mbedtls/error.h
index cff22ea..2fb86c7 100644
--- a/include/mbedtls/error.h
+++ b/include/mbedtls/error.h
@@ -128,28 +128,32 @@
void mbedtls_strerror( int errnum, char *buffer, size_t buflen );
/**
- * \brief Translate high level part of a mbed TLS error code into a string
+ * \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 and use it only for logging purposes.
+ * 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.
+ * \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 low level part of a mbed TLS error code into a string
+ * \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 and use it only for logging purposes.
+ * 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.
+ * \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 );