Repository navigation
Conversation
app_main kept rebuilding the server every 5 s without accepting. The server READMEs say the embedded certs and keys are public.
A failed handshake, read or write, or an empty datagram, tore down the listener and the task; now only that peer is dropped.
They went on to dereference a NULL address.
mktime read an uninitialized tm_isdst.
Any cert chaining to the CA was accepted as the server.
The SM2 test cert has no SAN, so SM builds check its CN instead.
Without a wolfSSL git hash date the example failed to compile.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the ESP32 TLS/DTLS example hardening changes.
No open issues 🎉
What changed in this PR
Hardens the ESP32 TLS 1.3 and DTLS 1.3 examples by addressing server identity checks, failure handling, and demo credential risks.
Changes:
- Adds server certificate name checks to clients.
- Improves DTLS peer recovery, honors ENC28J60 shutdown, and fixes initialization, DNS, logging, and build issues.
- Documents public test credentials in all six example READMEs.
| File | Description |
|---|---|
| ESP32/TLS13-wifi_station-server/README.md | Documents test credentials and shutdown command. |
| ESP32/TLS13-wifi_station-server/main/station_example_main.c | Zero-initializes time structure. |
| ESP32/TLS13-wifi_station-client/README.md | Documents credential replacement and server name. |
| ESP32/TLS13-wifi_station-client/main/station_example_main.c | Adds identity checks; fixes DNS and initialization handling. |
| ESP32/TLS13-ENC28J60-server/README.md | Documents test credentials and shutdown command. |
| ESP32/TLS13-ENC28J60-server/main/enc28j60_example_main.c | Prevents restart after shutdown; initializes time structure. |
| ESP32/TLS13-ENC28J60-client/README.md | Documents credential replacement and server name. |
| ESP32/TLS13-ENC28J60-client/main/enc28j60_example_main.c | Adds identity checks; fixes DNS and initialization handling. |
| ESP32/DTLS13-wifi-station-server/README.md | Warns about public server credentials. |
| ESP32/DTLS13-wifi-station-server/main/server-dtls13.c | Recovers from peer failures and safely terminates logged data. |
| ESP32/DTLS13-wifi-station-client/README.md | Documents test CA risks and server-name configuration. |
| ESP32/DTLS13-wifi-station-client/main/time_helper.c | Fixes fallback-time variable typo. |
| ESP32/DTLS13-wifi-station-client/main/include/client-dtls13.h | Defines certificate-specific default server names. |
| ESP32/DTLS13-wifi-station-client/main/client-dtls13.c | Enables server certificate name verification. |
Review effort: Balanced
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #662
Scan targets checked: wolfssl-examples-src, wolfssl-examples-bugs
Not reviewed (no scan target covers them): ESP32/DTLS13-wifi-station-client/README.md, ESP32/DTLS13-wifi-station-server/README.md, ESP32/TLS13-ENC28J60-client/README.md, ESP32/TLS13-ENC28J60-server/README.md, ESP32/TLS13-wifi_station-client/README.md, ESP32/TLS13-wifi_station-server/README.md
Coverage: 7 of 8 in-scope changed file(s) opened by the reviewer; not opened: ESP32/TLS13-wifi_station-server/main/station_example_main.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: Max
Fixes for ten Fenrir findings in the ESP32 TLS 1.3 / DTLS 1.3 example projects, one commit each, plus one typo fix.
Testing: all six projects build with ESP-IDF 5.5 against wolfSSL master.