From 6e87fc7f90062e97c4afee0025ba18a9b33a66b8 Mon Sep 17 00:00:00 2001 From: John Bland Date: Tue, 12 Sep 2023 18:25:10 -0400 Subject: [PATCH] switch to using ssl->error to check for previous error --- src/internal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/internal.c b/src/internal.c index 1498b1625..6808fb34c 100644 --- a/src/internal.c +++ b/src/internal.c @@ -15250,9 +15250,7 @@ static int DoCertificate(WOLFSSL* ssl, byte* input, word32* inOutIdx, /* Reset the session cert chain count in case the session resume failed, do not reset if we are resuming after an async wait */ #if defined(WOLFSSL_ASYNC_CRYPT) || defined(WOLFSSL_NONBLOCK_OCSP) - if (ssl->async == NULL || - (((ProcPeerCertArgs*)(ssl->async->args))->lastErr != OCSP_WANT_READ && - ((ProcPeerCertArgs*)(ssl->async->args))->lastErr != WC_PENDING_E)) + if ((ssl->error != OCSP_WANT_READ && ssl->error != WC_PENDING_E)) #endif { ssl->session->chain.count = 0;