mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Merge pull request #4099 from embhorn/zd12274
Fix nonblocking ret value from crlIOCb
This commit is contained in:
@ -354,7 +354,7 @@ int CheckCertCRL(WOLFSSL_CRL* crl, DecodedCert* cert)
|
||||
ret = crl->crlIOCb(crl, (const char*)cert->extCrlInfo,
|
||||
cert->extCrlInfoSz);
|
||||
if (ret == WOLFSSL_CBIO_ERR_WANT_READ) {
|
||||
ret = WANT_READ;
|
||||
ret = OCSP_WANT_READ;
|
||||
}
|
||||
else if (ret >= 0) {
|
||||
/* try again */
|
||||
@ -372,7 +372,7 @@ int CheckCertCRL(WOLFSSL_CRL* crl, DecodedCert* cert)
|
||||
/* Loading <issuer-hash>.rN form CRL file if find at the folder, */
|
||||
/* and try again checking Cert in the CRL list. */
|
||||
/* When not set the folder or not use hash_dir, do nothing. */
|
||||
if (foundEntry == 0) {
|
||||
if ((foundEntry == 0) && (ret != OCSP_WANT_READ)) {
|
||||
if (crl->cm->x509_store_p != NULL) {
|
||||
ret = LoadCertByIssuer(crl->cm->x509_store_p,
|
||||
(WOLFSSL_X509_NAME*)cert->issuerName, X509_LU_CRL);
|
||||
|
@ -8090,9 +8090,9 @@ int DoTls13HandShakeMsgType(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
||||
#endif /* NO_WOLFSSL_SERVER */
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) || defined(WOLFSSL_NONBLOCK_OCSP)
|
||||
/* if async, offset index so this msg will be processed again */
|
||||
if (ret == WC_PENDING_E && *inOutIdx > 0) {
|
||||
if ((ret == WC_PENDING_E || ret == OCSP_WANT_READ) && *inOutIdx > 0) {
|
||||
*inOutIdx -= HANDSHAKE_HEADER_SZ;
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user