Skip to content

Commit 724fdae

Browse files
committed
ocsp: propagate ocsp cb return error
1 parent 0f8b4db commit 724fdae

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/ocsp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,9 @@ int CheckOcspRequest(WOLFSSL_OCSP* ocsp, OcspRequest* ocspRequest,
536536
if (responseSz == WC_NO_ERR_TRACE(WOLFSSL_CBIO_ERR_WANT_READ)) {
537537
ret = OCSP_WANT_READ;
538538
}
539+
else if (responseSz == WC_NO_ERR_TRACE(WOLFSSL_CBIO_ERR_TIMEOUT)){
540+
ret = HTTP_TIMEOUT;
541+
}
539542

540543
XFREE(request, ocsp->cm->heap, DYNAMIC_TYPE_OCSP);
541544

tests/api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92179,7 +92179,7 @@ static int test_override_alt_cert_chain_ocsp_cb(void* ioCtx, const char* url,
9217992179
(void)request;
9218092180
(void)requestSz;
9218192181
(void)response;
92182-
return -1;
92182+
return WOLFSSL_CBIO_ERR_GENERAL;
9218392183
}
9218492184

9218592185
static int test_override_alt_cert_chain_client_ctx_ready(WOLFSSL_CTX* ctx)
@@ -96685,7 +96685,7 @@ static int test_ocsp_callback_fails_cb(void* ctx, const char* url, int urlSz,
9668596685
(void)ocspReqBuf;
9668696686
(void)ocspReqSz;
9668796687
(void)ocspRespBuf;
96688-
return -1;
96688+
return WOLFSSL_CBIO_ERR_GENERAL;
9668996689
}
9669096690
static int test_ocsp_callback_fails(void)
9669196691
{

0 commit comments

Comments
 (0)