Skip to content

Commit 7e4d2de

Browse files
committed
Fixes for async CI
1 parent 2889bf1 commit 7e4d2de

3 files changed

Lines changed: 22 additions & 11 deletions

File tree

examples/async/async_client.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,11 @@ int client_async_test(int argc, char** argv)
252252
AsyncTlsCryptoCbCtx cryptoCbCtx;
253253
#endif
254254
#ifdef WOLFSSL_STATIC_MEMORY
255-
static byte memory[300000];
256-
static byte memoryIO[34500];
255+
/* Sized for a TLS 1.3 mutual-auth handshake with every supported
256+
* operation class pending: suspended verifies during mutual auth raise
257+
* the bucket high-water mark well above the synchronous footprint. */
258+
static byte memory[800000];
259+
static byte memoryIO[64000];
257260
#if !defined(WOLFSSL_STATIC_MEMORY_LEAN)
258261
WOLFSSL_MEM_CONN_STATS ssl_stats;
259262
#endif

examples/async/async_server.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,11 @@ int server_async_test(int argc, char** argv)
212212
AsyncTlsCryptoCbCtx cryptoCbCtx;
213213
#endif
214214
#ifdef WOLFSSL_STATIC_MEMORY
215-
static byte memory[300000];
216-
static byte memoryIO[34500];
215+
/* Sized for a TLS 1.3 mutual-auth handshake with every supported
216+
* operation class pending: suspended verifies during mutual auth raise
217+
* the bucket high-water mark well above the synchronous footprint. */
218+
static byte memory[800000];
219+
static byte memoryIO[64000];
217220
#if !defined(WOLFSSL_STATIC_MEMORY_LEAN)
218221
WOLFSSL_MEM_CONN_STATS ssl_stats;
219222
#endif

src/tls13.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15674,11 +15674,15 @@ int DoTls13HandShakeMsg(WOLFSSL* ssl, byte* input, word32* inOutIdx,
1567415674
totalSz);
1567515675
#if defined(WOLFSSL_ASYNC_CRYPT) || defined(WOLFSSL_NONBLOCK_OCSP)
1567615676
if ((ret == WC_NO_ERR_TRACE(WC_PENDING_E) &&
15677-
(ssl->kdfMsgStep == 0 || kdfStepEntry != 0)) ||
15677+
(ssl->kdfMsgStep == 0 || kdfStepEntry != 0) &&
15678+
ssl->options.processReply != 0 /* doProcessInit */) ||
1567815679
ret == WC_NO_ERR_TRACE(OCSP_WANT_READ)) {
15679-
/* Re-present for in-handler pends and pre-dispatch drain pends;
15680-
* a post-handler key-schedule pend must NOT replay (state is
15681-
* committed; DoTls13MsgDerives() finishes it instead). */
15680+
/* Re-present for in-handler pends and pre-dispatch drain pends.
15681+
* Not for post-handler pends, which committed the message: a
15682+
* key-schedule pend (kdfMsgStep != 0) resumes through
15683+
* DoTls13MsgDerives(), and a post-handshake-auth send pend
15684+
* (processReply reset to doProcessInit) resumes through
15685+
* wolfSSL_negotiate(). */
1568215686
*inOutIdx = startIdx;
1568315687
}
1568415688
#endif
@@ -15710,10 +15714,11 @@ int DoTls13HandShakeMsg(WOLFSSL* ssl, byte* input, word32* inOutIdx,
1571015714
ssl->pendingMsgSz);
1571115715
#if defined(WOLFSSL_ASYNC_CRYPT) || defined(WOLFSSL_NONBLOCK_OCSP)
1571215716
if ((ret == WC_NO_ERR_TRACE(WC_PENDING_E) &&
15713-
(ssl->kdfMsgStep == 0 || kdfStepEntry != 0)) ||
15717+
(ssl->kdfMsgStep == 0 || kdfStepEntry != 0) &&
15718+
ssl->options.processReply != 0 /* doProcessInit */) ||
1571415719
ret == WC_NO_ERR_TRACE(OCSP_WANT_READ)) {
15715-
/* Re-present the fragment; a post-handler key-schedule
15716-
* pend falls through and consumes the message. */
15720+
/* Re-present the fragment; a post-handler pend falls
15721+
* through and consumes the message. */
1571715722
ssl->pendingMsgOffset -= inputLength;
1571815723
*inOutIdx -= inputLength;
1571915724
}

0 commit comments

Comments
 (0)