Skip to content

Commit 1ffdb18

Browse files
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 <[email protected]>
1 parent 2759512 commit 1ffdb18

File tree

3 files changed

+6
-32
lines changed

3 files changed

+6
-32
lines changed

ChangeLog.d/error-unification.txt

+4
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ API changes
55
Mbed TLS error codes..
66
This will not affect most applications since in both cases, the
77
error values are between -32767 and -1 as before.
8+
9+
Removals
10+
* Remove mbedtls_low_level_sterr() and mbedtls_high_level_strerr(),
11+
since these concepts no longer exists. There is just mbedtls_strerror().

include/mbedtls/error.h

-30
Original file line numberDiff line numberDiff line change
@@ -30,36 +30,6 @@ extern "C" {
3030
*/
3131
void mbedtls_strerror(int errnum, char *buffer, size_t buflen);
3232

33-
/**
34-
* \brief Translate the high-level part of an Mbed TLS error code into a string
35-
* representation.
36-
*
37-
* This function returns a const pointer to an un-modifiable string. The caller
38-
* must not try to modify the string. It is intended to be used mostly for
39-
* logging purposes.
40-
*
41-
* \param error_code error code
42-
*
43-
* \return The string representation of the error code, or \c NULL if the error
44-
* code is unknown.
45-
*/
46-
const char *mbedtls_high_level_strerr(int error_code);
47-
48-
/**
49-
* \brief Translate the low-level part of an Mbed TLS error code into a string
50-
* representation.
51-
*
52-
* This function returns a const pointer to an un-modifiable string. The caller
53-
* must not try to modify the string. It is intended to be used mostly for
54-
* logging purposes.
55-
*
56-
* \param error_code error code
57-
*
58-
* \return The string representation of the error code, or \c NULL if the error
59-
* code is unknown.
60-
*/
61-
const char *mbedtls_low_level_strerr(int error_code);
62-
6333
#ifdef __cplusplus
6434
}
6535
#endif

scripts/data_files/error.fmt

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
HEADER_INCLUDED
2222

23-
const char *mbedtls_high_level_strerr(int error_code)
23+
static const char *mbedtls_high_level_strerr(int error_code)
2424
{
2525
int high_level_error_code;
2626

@@ -43,7 +43,7 @@ const char *mbedtls_high_level_strerr(int error_code)
4343
return NULL;
4444
}
4545

46-
const char *mbedtls_low_level_strerr(int error_code)
46+
static const char *mbedtls_low_level_strerr(int error_code)
4747
{
4848
int low_level_error_code;
4949

0 commit comments

Comments
 (0)