Fix for handling OCSP response in non-blocking mode.

This commit is contained in:
David Garske
2020-08-06 17:06:16 -07:00
parent 44e575b8c4
commit 085f55195a
2 changed files with 8 additions and 0 deletions

View File

@@ -453,6 +453,7 @@ int CheckOcspRequest(WOLFSSL_OCSP* ocsp, OcspRequest* ocspRequest,
}
else {
/* cert doesn't have extAuthInfo, assuming CERT_GOOD */
WOLFSSL_MSG("Cert has no OCSP URL, assuming CERT_GOOD");
return 0;
}

View File

@@ -1078,6 +1078,13 @@ int wolfIO_HttpProcessResponse(int sfd, const char** appStrList,
start[len] = 0;
}
else {
#ifdef WOLFSSL_NONBLOCK_OCSP
result = wolfSSL_LastError();
if (result == SOCKET_EWOULDBLOCK) {
return OCSP_WANT_READ;
}
#endif
WOLFSSL_MSG("wolfIO_HttpProcessResponse recv http from peer failed");
return -1;
}