From 1ffdb18cdbc05dcc3d110540513c9bd2e570a647 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 24 Jan 2025 15:46:11 +0100 Subject: [PATCH] Remove mbedtls_low_level_sterr() and mbedtls_high_level_strerr() Just removed from the API. We can greatly simplify error.c but that will be for later. Signed-off-by: Gilles Peskine --- ChangeLog.d/error-unification.txt | 4 ++++ include/mbedtls/error.h | 30 ------------------------------ scripts/data_files/error.fmt | 4 ++-- 3 files changed, 6 insertions(+), 32 deletions(-) diff --git a/ChangeLog.d/error-unification.txt b/ChangeLog.d/error-unification.txt index e1790d29d2..a19e60c008 100644 --- a/ChangeLog.d/error-unification.txt +++ b/ChangeLog.d/error-unification.txt @@ -5,3 +5,7 @@ API changes Mbed TLS error codes.. This will not affect most applications since in both cases, the error values are between -32767 and -1 as before. + +Removals + * Remove mbedtls_low_level_sterr() and mbedtls_high_level_strerr(), + since these concepts no longer exists. There is just mbedtls_strerror(). diff --git a/include/mbedtls/error.h b/include/mbedtls/error.h index 8b7c19aa5f..7abb00fd03 100644 --- a/include/mbedtls/error.h +++ b/include/mbedtls/error.h @@ -30,36 +30,6 @@ 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 diff --git a/scripts/data_files/error.fmt b/scripts/data_files/error.fmt index b75a9ab4ec..14522ecd20 100644 --- a/scripts/data_files/error.fmt +++ b/scripts/data_files/error.fmt @@ -20,7 +20,7 @@ HEADER_INCLUDED -const char *mbedtls_high_level_strerr(int error_code) +static const char *mbedtls_high_level_strerr(int error_code) { int high_level_error_code; @@ -43,7 +43,7 @@ const char *mbedtls_high_level_strerr(int error_code) return NULL; } -const char *mbedtls_low_level_strerr(int error_code) +static const char *mbedtls_low_level_strerr(int error_code) { int low_level_error_code;