forked from wolfSSL/wolfssl
check for socket errors on SendAlert
This commit is contained in:
@ -33327,7 +33327,14 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
|||||||
if (ret != 0 || !ssl->options.dtlsStateful) {
|
if (ret != 0 || !ssl->options.dtlsStateful) {
|
||||||
int alertType = TranslateErrorToAlert(ret);
|
int alertType = TranslateErrorToAlert(ret);
|
||||||
if (alertType != invalid_alert)
|
if (alertType != invalid_alert)
|
||||||
SendAlert(ssl, alert_fatal, alertType);
|
if (alertType != invalid_alert) {
|
||||||
|
int err;
|
||||||
|
|
||||||
|
/* propogate socket errors to avoid re-calling send alert */
|
||||||
|
err = SendAlert(ssl, alert_fatal, alertType);
|
||||||
|
if (err == SOCKET_ERROR_E)
|
||||||
|
ret = SOCKET_ERROR_E;
|
||||||
|
}
|
||||||
*inOutIdx += helloSz;
|
*inOutIdx += helloSz;
|
||||||
DtlsResetState(ssl);
|
DtlsResetState(ssl);
|
||||||
if (DtlsIgnoreError(ret))
|
if (DtlsIgnoreError(ret))
|
||||||
|
Reference in New Issue
Block a user