mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
wolfssl/wolfcrypt/error-crypt.h: move MPI error codes to range {-97, -100} to avoid collisions.
This commit is contained in:
@@ -2627,7 +2627,6 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t error_test(void)
|
||||
int first;
|
||||
int last;
|
||||
} missing[] = {
|
||||
{ -6, -100 },
|
||||
{ -124, -124 },
|
||||
{ -166, -169 }
|
||||
};
|
||||
|
@@ -220,7 +220,7 @@ enum wolfSSL_ErrorCodes {
|
||||
WOLFSSL_LOCAL
|
||||
void SetErrorString(int err, char* buff);
|
||||
|
||||
#ifdef WOLFSSL_DEBUG_TRACE_ERROR_CODES
|
||||
#if defined(WOLFSSL_DEBUG_TRACE_ERROR_CODES) && defined(BUILDING_WOLFSSL)
|
||||
#include <wolfssl/debug-trace-error-codes.h>
|
||||
#endif
|
||||
|
||||
|
@@ -43,14 +43,14 @@ the error status.
|
||||
|
||||
/* error codes, add string for new errors !!! */
|
||||
enum {
|
||||
MAX_CODE_E = -1, /* errors -2 - -299 */
|
||||
WC_FIRST_E = -2, /* errors -2 - -299 */
|
||||
MAX_CODE_E = -96, /* errors -97 - -299 */
|
||||
WC_FIRST_E = -97, /* errors -97 - -299 */
|
||||
|
||||
MP_MEM = -2, /* MP dynamic memory allocation failed. */
|
||||
MP_VAL = -3, /* MP value passed is not able to be used. */
|
||||
MP_WOULDBLOCK = -4, /* MP non-blocking operation is returning after
|
||||
MP_MEM = -97, /* MP dynamic memory allocation failed. */
|
||||
MP_VAL = -98, /* MP value passed is not able to be used. */
|
||||
MP_WOULDBLOCK = -99, /* MP non-blocking operation is returning after
|
||||
* partial completion. */
|
||||
MP_NOT_INF = -5, /* MP point not at infinity */
|
||||
MP_NOT_INF = -100, /* MP point not at infinity */
|
||||
|
||||
OPEN_RAN_E = -101, /* opening random device error */
|
||||
READ_RAN_E = -102, /* reading random device error */
|
||||
@@ -304,10 +304,7 @@ WOLFSSL_API void wc_ErrorString(int err, char* buff);
|
||||
WOLFSSL_ABI WOLFSSL_API const char* wc_GetErrorString(int error);
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_DEBUG_TRACE_ERROR_CODES) && !defined(BUILDING_WOLFSSL)
|
||||
#undef WOLFSSL_DEBUG_TRACE_ERROR_CODES
|
||||
#endif
|
||||
#ifdef WOLFSSL_DEBUG_TRACE_ERROR_CODES
|
||||
#if defined(WOLFSSL_DEBUG_TRACE_ERROR_CODES) && defined(BUILDING_WOLFSSL)
|
||||
extern void wc_backtrace_render(void);
|
||||
#define WC_NO_ERR_TRACE(label) (CONST_NUM_ERR_ ## label)
|
||||
#ifndef WOLFSSL_DEBUG_BACKTRACE_RENDER_CLAUSE
|
||||
|
Reference in New Issue
Block a user