Skip to content

Commit

Permalink
Merge pull request #8055 from rizlik/ocsp-cb-ret-propagate
Browse files Browse the repository at this point in the history
ocsp: propagate ocsp cb return error
  • Loading branch information
douzzer authored Oct 15, 2024
2 parents 3e1f365 + 724fdae commit c714664
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/ocsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,9 @@ int CheckOcspRequest(WOLFSSL_OCSP* ocsp, OcspRequest* ocspRequest,
if (responseSz == WC_NO_ERR_TRACE(WOLFSSL_CBIO_ERR_WANT_READ)) {
ret = OCSP_WANT_READ;
}
else if (responseSz == WC_NO_ERR_TRACE(WOLFSSL_CBIO_ERR_TIMEOUT)){
ret = HTTP_TIMEOUT;
}

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

Expand Down
4 changes: 2 additions & 2 deletions tests/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -92291,7 +92291,7 @@ static int test_override_alt_cert_chain_ocsp_cb(void* ioCtx, const char* url,
(void)request;
(void)requestSz;
(void)response;
return -1;
return WOLFSSL_CBIO_ERR_GENERAL;
}

static int test_override_alt_cert_chain_client_ctx_ready(WOLFSSL_CTX* ctx)
Expand Down Expand Up @@ -96798,7 +96798,7 @@ static int test_ocsp_callback_fails_cb(void* ctx, const char* url, int urlSz,
(void)ocspReqBuf;
(void)ocspReqSz;
(void)ocspRespBuf;
return -1;
return WOLFSSL_CBIO_ERR_GENERAL;
}
static int test_ocsp_callback_fails(void)
{
Expand Down

0 comments on commit c714664

Please sign in to comment.