Skip to content

Commit 7435d23

Browse files
Merge pull request #6931 from dgarske/async_v5.6.4
Async v5.6.4
2 parents 37884f8 + 2ac0d47 commit 7435d23

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

src/internal.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7624,6 +7624,12 @@ int AllocKey(WOLFSSL* ssl, int type, void** pKey)
76247624
/* Sanity check key destination */
76257625
if (*pKey != NULL) {
76267626
WOLFSSL_MSG("Key already present!");
7627+
#ifdef WOLFSSL_ASYNC_CRYPT
7628+
/* allow calling this again for async reentry */
7629+
if (ssl->error == WC_PENDING_E) {
7630+
return 0;
7631+
}
7632+
#endif
76277633
return BAD_STATE_E;
76287634
}
76297635

@@ -38891,14 +38897,17 @@ int wolfSSL_AsyncPop(WOLFSSL* ssl, byte* state)
3889138897
XMEMSET(&asyncDev->event, 0, sizeof(WOLF_EVENT));
3889238898
ssl->asyncDev = NULL;
3889338899
}
38894-
#if !defined(WOLFSSL_ASYNC_CRYPT_SW) && \
38895-
(defined(WOLF_CRYPTO_CB) || defined(HAVE_PK_CALLBACKS))
38900+
/* for crypto or PK callback, if pending remove from queue */
38901+
#if (defined(WOLF_CRYPTO_CB) || defined(HAVE_PK_CALLBACKS)) && \
38902+
!defined(WOLFSSL_ASYNC_CRYPT_SW) && !defined(HAVE_INTEL_QA) && \
38903+
!defined(HAVE_CAVIUM)
3889638904
else if (ret == WC_PENDING_E) {
3889738905
/* Allow the underlying crypto API to be called again to trigger the
3889838906
* crypto or PK callback. The actual callback must be called, since
3889938907
* the completion is not detected in the poll like Intel QAT or
3890038908
* Nitrox */
3890138909
ret = wolfEventQueue_Remove(&ssl->ctx->event_queue, event);
38910+
3890238911
}
3890338912
#endif
3890438913
}

tests/api.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36008,7 +36008,8 @@ static int test_wolfSSL_CTX_add_client_CA(void)
3600836008
#endif /* OPENSSL_EXTRA && !NO_RSA && !NO_CERTS && !NO_WOLFSSL_CLIENT */
3600936009
return EXPECT_RESULT();
3601036010
}
36011-
#if defined(WOLFSSL_TLS13) && defined(HAVE_ECH)
36011+
#if defined(WOLFSSL_TLS13) && defined(HAVE_ECH) && \
36012+
defined(HAVE_IO_TESTS_DEPENDENCIES)
3601236013
static THREAD_RETURN WOLFSSL_THREAD server_task_ech(void* args)
3601336014
{
3601436015
callback_functions* callbacks = ((func_args*)args)->callbacks;
@@ -68190,7 +68191,8 @@ TEST_CASE testCases[] = {
6819068191
TEST_DECL(test_wolfSSL_wolfSSL_UseSecureRenegotiation),
6819168192
TEST_DECL(test_wolfSSL_SCR_Reconnect),
6819268193
TEST_DECL(test_tls_ext_duplicate),
68193-
#if defined(WOLFSSL_TLS13) && defined(HAVE_ECH)
68194+
#if defined(WOLFSSL_TLS13) && defined(HAVE_ECH) && \
68195+
defined(HAVE_IO_TESTS_DEPENDENCIES)
6819468196
TEST_DECL(test_wolfSSL_Tls13_ECH_params),
6819568197
/* Uses Assert in handshake callback. */
6819668198
TEST_DECL(test_wolfSSL_Tls13_ECH),

0 commit comments

Comments
 (0)