From a0608151cf53961e3c646930182e25e7eadc7e36 Mon Sep 17 00:00:00 2001 From: David Garske Date: Fri, 12 Oct 2018 11:20:13 -0700 Subject: [PATCH] Fix for the `WOLFSSL_NONBLOCK_OCSP` case to reset the error code as well. --- src/internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index b4fd45c69..d56d63e86 100644 --- a/src/internal.c +++ b/src/internal.c @@ -10913,7 +10913,7 @@ static int DoHandShakeMsgType(WOLFSSL* ssl, byte* input, word32* inOutIdx, } /* make sure async error is cleared */ - if (ret == 0 && ssl->error == WC_PENDING_E) { + if (ret == 0 && (ssl->error == WC_PENDING_E || ssl->error == OCSP_WANT_READ)) { ssl->error = 0; } #endif /* WOLFSSL_ASYNC_CRYPT || WOLFSSL_NONBLOCK_OCSP */