Commit cee1679
committed
treewide: support TLS 1.3
Now that we're on ESP-IDF v5.2, TLS 1.3 is properly supported. Let's
enable it.
This requires us to increase the WAS WebSocket client task stack to
avoid a stack overflow:
***ERROR*** A stack overflow in task websocket_task has been detected.
Let's set it to the same value as the Home Assistant WS client.
It appears with TLS 1.3, the WIS nginx config forces Willow to use the
TLS_AES_256_GCM_SHA384 cipher. This is due to the
ssl_prefer_server_ciphers being enabled. I've done several torture test
runs with different combinations of ciphers. The shortest time between
AUDIO_REC_WAKEUP_END and receiving the response from Home Assistant was
120ms:
I (11:04:27.300) WILLOW/AUDIO: AUDIO_REC_WAKEUP_END
I (11:04:27.307) WILLOW/AUDIO: WIS HTTP client HTTP_STREAM_POST_REQUEST, write end chunked marker
I (11:04:27.383) WILLOW/AUDIO: WIS HTTP client HTTP_STREAM_FINISH_REQUEST
I (11:04:27.384) WILLOW/AUDIO: WIS HTTP Response = {"infer_time":66.789,"infer_speedup":29,"audio_duration":1984,"language":"en","text":"Turn off dining room."}
I (11:04:27.421) WILLOW/WAS: received text data on WebSocket: {"result":{"ok":true,"speech":"Turned off the light"}}
This was with WAS/TLS_AES_256_GCM_SHA384 and
WIS/TLS_CHACHA20_POLY1305_SHA256. With different cipher combinations.
the results were similar. In any case, the 2 ciphers used in torture
testing seem to work well.
Torture test results: 1000/1000. [WAS: AES - WIS: ChachaPoly]
Torture test results: 1000/1000. [WAS/WIS: ChachaPoly]
Torture test results: 1000/1000. [WAS/ ChachaPoly - WIS: AES]
Closes #2721 parent b6de547 commit cee1679
3 files changed
+15
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| |||
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
128 | 141 | | |
129 | 142 | | |
130 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| 391 | + | |
391 | 392 | | |
392 | 393 | | |
393 | 394 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
0 commit comments