mirror of https://github.com/wolfSSL/wolfssl.git
A crypto callback that returns WC_PENDING_E for a TLS record cipher silently corrupted records: Encrypt()/Decrypt() advance the cipher state to CIPHER_STATE_END before the pending check, so on resume the record is shipped without re-running the cipher. WOLF_CRYPTO_CB_ASYNC_POLL gives crypto callback devices the QAT/Nitrox "poll to fill output" completion model. On WC_PENDING_E the async event stays queued; wolfSSL_AsyncPoll() re-enters the device with the new WC_ALGO_TYPE_ASYNC_POLL (wc_CryptoCb_Poll) to finish the job and fill the output buffer. The re-entry only polls while the event is still pending, and a device that cannot complete the job (no poll support, or it reports nothing pending) hard-fails with WC_HW_E rather than reporting the op done with an unfilled buffer. Only the two async record ciphers (AES and 3DES markers) are routed to poll completion, and only when crypto callbacks are the async backend (not QAT/Cavium/SW); handshake PK keeps the re-invoke model. The wolfSSL_AsyncPop eviction is gated for poll-capable devices so the existing resume-at-CIPHER_STATE_END path becomes correct with no record state-machine changes. Without the feature (and without a software/QAT/Cavium backend) a pending bulk cipher op now errors out with ASYNC_OP_E instead of corrupting the record, and configure/cryptocb.c warn about the unsupported combination. Tests in tests/api/test_async.c cover direct AES-GCM/CBC/CCM and 3DES poll completion in both directions at multiple pend depths, negative cases for cipher types defined but not dispatched (ChaCha, single DES), and full TLS 1.3 handshake+echo: an encrypt-offload run, a both- directions run that offloads encrypt and decrypt on both peers using a per-peer device, and the no-poll failure path. |
||
|---|---|---|
| .. | ||
| api | ||
| emnet | ||
| freertos-mem-track-repro | ||
| swdev | ||
| unit-mcdc | ||
| CONF_FILES_README.md | ||
| NCONF_test.cnf | ||
| README | ||
| TXT_DB.txt | ||
| api.c | ||
| include.am | ||
| quic.c | ||
| srp.c | ||
| suites.c | ||
| test-altchains.conf | ||
| test-chains.conf | ||
| test-dhprime.conf | ||
| test-dtls-downgrade.conf | ||
| test-dtls-fails-cipher.conf | ||
| test-dtls-fails.conf | ||
| test-dtls-group.conf | ||
| test-dtls-mtu.conf | ||
| test-dtls-reneg-client.conf | ||
| test-dtls-reneg-server.conf | ||
| test-dtls-resume.conf | ||
| test-dtls-sha2.conf | ||
| test-dtls-srtp-fails.conf | ||
| test-dtls-srtp.conf | ||
| test-dtls.conf | ||
| test-dtls13-cid.conf | ||
| test-dtls13-downgrade-fails.conf | ||
| test-dtls13-downgrade.conf | ||
| test-dtls13-pq-hybrid-extra-frag.conf | ||
| test-dtls13-pq-hybrid-extra.conf | ||
| test-dtls13-pq-hybrid-frag.conf | ||
| test-dtls13-pq-standalone-frag.conf | ||
| test-dtls13-pq-standalone.conf | ||
| test-dtls13-psk.conf | ||
| test-dtls13.conf | ||
| test-ecc-cust-curves.conf | ||
| test-ed448.conf | ||
| test-ed25519.conf | ||
| test-enckeys.conf | ||
| test-fails.conf | ||
| test-maxfrag-dtls.conf | ||
| test-maxfrag.conf | ||
| test-p521.conf | ||
| test-psk-no-id-sha2.conf | ||
| test-psk-no-id.conf | ||
| test-psk.conf | ||
| test-rsapss.conf | ||
| test-sctp-sha2.conf | ||
| test-sctp.conf | ||
| test-sha2.conf | ||
| test-sig.conf | ||
| test-sm2.conf | ||
| test-tls-downgrade.conf | ||
| test-tls13-down.conf | ||
| test-tls13-ecc.conf | ||
| test-tls13-pq-hybrid-extra.conf | ||
| test-tls13-pq-hybrid.conf | ||
| test-tls13-pq-standalone.conf | ||
| test-tls13-psk-certs.conf | ||
| test-tls13-psk.conf | ||
| test-tls13-slhdsa-fail.conf | ||
| test-tls13-slhdsa-sha2.conf | ||
| test-tls13-slhdsa-shake.conf | ||
| test-tls13.conf | ||
| test-trustpeer.conf | ||
| test.conf | ||
| unit.c | ||
| unit.h | ||
| utils.c | ||
| utils.h | ||
| w64wrapper.c | ||
README
Before creating any new configure files (.conf) read the CONF_FILES_README.md