Repository navigation
Use SNI in google.test, return MEMORY_E instead of DECODE_E - #11968
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The test guard still permits --enable-trackmemory, allowing tracked and native allocators to mix during cleanup and cause invalid frees that can crash the test process.
1 open issue
What changed in this PR
This PR addresses google.test failures caused by large default certificates and corrects memory-allocation error reporting during peer-certificate processing.
Changes:
- Enable SNI in Google connection tests when supported.
- Propagate
MEMORY_Ewhen copying the peer certificate fails. - Add TLS 1.2 and TLS 1.3 regression tests for that failure.
| File | Description |
|---|---|
tests/api/test_ssl_cert.h |
Declares and registers the new regression test. |
tests/api/test_ssl_cert.c |
Adds allocation-failure tests for peer-certificate copying. |
src/internal.c |
Preserves the certificate-copy memory error. |
scripts/google.test |
Detects SNI support and supplies the server name. |
Review effort: Balanced
|
9ab1e2c to
ade4e37
Compare
ade4e37 to
ca8604f
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11968
Scan targets checked: wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): scripts/google.test, tests/api/test_ssl_cert.h
Coverage: 1 of 2 in-scope changed file(s) opened by the reviewer; not opened: tests/api/test_ssl_cert.c
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Lite
|
note: the multi-test failure is unrelated and a known issue being fixed separately. |


Description
Fixes failing
google.testinPRB-generic-config-parser. As of Oct 30, google started replying with 130 SAN in response to the client handshake ingoogle.test. This causes the test to fail since it does not have memory to store all of them. Fix is to use the-Soption on theclientapp to enable SNI and get a single SAN.Also fixes the return code from
ProcessPeerCertsto properly indicate the failure condition.Testing
CI, added unit tests
Checklist