Skip to content

Commit

Permalink
restore previous values of WOLFSSL_CBIO_ERR_* to try to pass "hostap …
Browse files Browse the repository at this point in the history
…and wpa-supplicant Tests / hwsim test".
  • Loading branch information
douzzer committed Aug 29, 2024
1 parent bdc0d98 commit 2062bba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -25713,7 +25713,6 @@ const char* wolfSSL_ERR_reason_error_string(unsigned long e)

case WOLFSSL_FATAL_ERROR:
return "fatal error";
#endif /* 0 */

case WOLFSSL_CBIO_ERR_GENERAL:
return "I/O callback general unexpected error";
Expand All @@ -25735,6 +25734,7 @@ const char* wolfSSL_ERR_reason_error_string(unsigned long e)

case WOLFSSL_CBIO_ERR_TIMEOUT:
return "I/O callback socket timeout";
#endif /* 0 */

default :
return "unknown error number";
Expand Down
2 changes: 1 addition & 1 deletion tests/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -83192,7 +83192,7 @@ static int error_test(void)
{ -358, -358 },
{ -372, -372 },
{ -384, -384 },
{ -465, -499 }
{ -458, -499 }
};

/* Check that all errors have a string and it's the same through the two
Expand Down
18 changes: 9 additions & 9 deletions wolfssl/error-ssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ enum wolfSSL_ErrorCodes {
WOLFSSL_FATAL_ERROR = -1, /* note, must be -1 for backward
* compat. */

/* I/O Callback errors */
WOLFSSL_CBIO_ERR_GENERAL = -1, /* I/O callback general unexpected error */
WOLFSSL_CBIO_ERR_WANT_READ = -2, /* I/O callback want read, call again */
WOLFSSL_CBIO_ERR_WANT_WRITE = -2, /* I/O callback want write, call again */
WOLFSSL_CBIO_ERR_CONN_RST = -3, /* I/O callback connection reset */
WOLFSSL_CBIO_ERR_ISR = -4, /* I/O callback interrupt */
WOLFSSL_CBIO_ERR_CONN_CLOSE = -5, /* I/O callback connection closed or epipe */
WOLFSSL_CBIO_ERR_TIMEOUT = -6, /* I/O callback socket timeout */

WOLFSSL_FIRST_E = -301,

INPUT_CASE_ERROR = -301, /* process input state error */
Expand Down Expand Up @@ -203,15 +212,6 @@ enum wolfSSL_ErrorCodes {
QUIC_WRONG_ENC_LEVEL = -456, /* QUIC data received on wrong encryption level */
DUPLICATE_TLS_EXT_E = -457, /* Duplicate TLS extension in msg. */

/* I/O Callback errors */
WOLFSSL_CBIO_ERR_GENERAL = -458, /* I/O callback general unexpected error */
WOLFSSL_CBIO_ERR_WANT_READ = -459, /* I/O callback want read, call again */
WOLFSSL_CBIO_ERR_WANT_WRITE = -460, /* I/O callback want write, call again */
WOLFSSL_CBIO_ERR_CONN_RST = -461, /* I/O callback connection reset */
WOLFSSL_CBIO_ERR_ISR = -462, /* I/O callback interrupt */
WOLFSSL_CBIO_ERR_CONN_CLOSE = -463, /* I/O callback connection closed or epipe */
WOLFSSL_CBIO_ERR_TIMEOUT = -464, /* I/O callback socket timeout */

/* negotiation parameter errors */
UNSUPPORTED_SUITE = -500, /* unsupported cipher suite */
MATCH_SUITE_ERROR = -501, /* can't match cipher suite */
Expand Down

0 comments on commit 2062bba

Please sign in to comment.