-
Notifications
You must be signed in to change notification settings - Fork 958
Fixed failing cert verification with nonblocking-OCSP and low MFL #9957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -13448,8 +13448,8 @@ int DoTls13HandShakeMsg(WOLFSSL* ssl, byte* input, word32* inOutIdx, | |||||||
| &idx, ssl->arrays->pendingMsgType, | ||||||||
| ssl->arrays->pendingMsgSz - HANDSHAKE_HEADER_SZ, | ||||||||
| ssl->arrays->pendingMsgSz); | ||||||||
| #ifdef WOLFSSL_ASYNC_CRYPT | ||||||||
| if (ret == WC_NO_ERR_TRACE(WC_PENDING_E)) { | ||||||||
| #if defined(WOLFSSL_ASYNC_CRYPT) || defined(WOLFSSL_NONBLOCK_OCSP) | ||||||||
| if (ret == WC_NO_ERR_TRACE(WC_PENDING_E) || ret == WC_NO_ERR_TRACE(OCSP_WANT_READ)) { | ||||||||
|
||||||||
| if (ret == WC_NO_ERR_TRACE(WC_PENDING_E) || ret == WC_NO_ERR_TRACE(OCSP_WANT_READ)) { | |
| if (ret == WC_NO_ERR_TRACE(WC_PENDING_E) || | |
| ret == WC_NO_ERR_TRACE(OCSP_WANT_READ)) { |
Copilot
AI
Mar 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change adds special handling for OCSP_WANT_READ when completing a fragmented TLS 1.3 handshake message. There doesn’t appear to be an automated regression test exercising TLS 1.3 fragmentation together with a nonblocking OCSP callback that returns WANT_READ (e.g., similar to the existing TLS1.3 fragment test in tests/test-tls13.conf, but with WOLFSSL_NONBLOCK_OCSP/OCSP callback configured). Adding such a test would help prevent regressions in this retry/rewind logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rollback for OCSP_WANT_READ is currently compiled only when WOLFSSL_NONBLOCK_OCSP or WOLFSSL_ASYNC_CRYPT is defined. OCSP_WANT_READ can also be returned from CRL I/O paths (HAVE_CRL_IO) during cert verification, and this fragment-buffer code would still free pendingMsg and advance *inOutIdx in that case, reintroducing the same “skip pendingMsg” behavior. Consider keying this block off WOLFSSL_ASYNC_IO (or additionally HAVE_CRL_IO) to ensure any nonblocking I/O path returning OCSP_WANT_READ preserves pendingMsg for retry.