mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-05 13:44:41 +02:00
Don't touch processReply state in DoApplicationData
This commit is contained in:
@@ -19640,18 +19640,12 @@ int DoApplicationData(WOLFSSL* ssl, byte* input, word32* inOutIdx, int sniff)
|
|||||||
*inOutIdx = idx;
|
*inOutIdx = idx;
|
||||||
#ifdef WOLFSSL_DTLS13
|
#ifdef WOLFSSL_DTLS13
|
||||||
if (ssl->options.connectState == WAIT_FINISHED_ACK) {
|
if (ssl->options.connectState == WAIT_FINISHED_ACK) {
|
||||||
/* Reset the processReply state since
|
|
||||||
* we finished processing this message. */
|
|
||||||
ssl->options.processReply = doProcessInit;
|
|
||||||
/* DTLS 1.3 is waiting for an ACK but we can still return app data. */
|
/* DTLS 1.3 is waiting for an ACK but we can still return app data. */
|
||||||
return APP_DATA_READY;
|
return APP_DATA_READY;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SECURE_RENEGOTIATION
|
#ifdef HAVE_SECURE_RENEGOTIATION
|
||||||
if (IsSCR(ssl)) {
|
if (IsSCR(ssl)) {
|
||||||
/* Reset the processReply state since
|
|
||||||
* we finished processing this message. */
|
|
||||||
ssl->options.processReply = doProcessInit;
|
|
||||||
/* If we are in a secure renegotiation then APP DATA is treated
|
/* If we are in a secure renegotiation then APP DATA is treated
|
||||||
* differently */
|
* differently */
|
||||||
return APP_DATA_READY;
|
return APP_DATA_READY;
|
||||||
@@ -21211,7 +21205,13 @@ default:
|
|||||||
&ssl->buffers.inputBuffer.idx,
|
&ssl->buffers.inputBuffer.idx,
|
||||||
NO_SNIFF)) != 0) {
|
NO_SNIFF)) != 0) {
|
||||||
WOLFSSL_ERROR(ret);
|
WOLFSSL_ERROR(ret);
|
||||||
return ret;
|
#if defined(WOLFSSL_DTLS13) || \
|
||||||
|
defined(HAVE_SECURE_RENEGOTIATION)
|
||||||
|
/* Not really an error. We will return after cleaning
|
||||||
|
* up the processReply state. */
|
||||||
|
if (ret != APP_DATA_READY)
|
||||||
|
#endif
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -21334,6 +21334,11 @@ default:
|
|||||||
* by higher layers. */
|
* by higher layers. */
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
#endif
|
||||||
|
#if defined(WOLFSSL_DTLS13) || defined(HAVE_SECURE_RENEGOTIATION)
|
||||||
|
/* Signal to user that we have application data ready to read */
|
||||||
|
if (ret == APP_DATA_READY)
|
||||||
|
return ret;
|
||||||
#endif
|
#endif
|
||||||
/* It is safe to shrink the input buffer here now. local vars will
|
/* It is safe to shrink the input buffer here now. local vars will
|
||||||
* be reset to the new starting value. */
|
* be reset to the new starting value. */
|
||||||
|
Reference in New Issue
Block a user