Repository navigation
Commit 26da4b8
committed
Hand pre-1.3 DTLS connections to the legacy handshake
wolfSSL_connect_TLSv13() and wolfSSL_accept_TLSv13() handed off to
wolfSSL_connect() and wolfSSL_accept() only when their own mask check
moved the version. wolfSSL_set_options(),
wolfSSL_set_max_proto_version() and CTX setup now move a DTLS SSL to
DTLS 1.2 before either entry point runs, so such an SSL went into the
TLS 1.3 state machine. With ECH built in, SendTls13ClientHello() failed,
since no ECH extension is added below TLS 1.3.
Both entry points now hand any DTLS SSL below 1.3 to the legacy
handshake, on every call. That also covers re-entry with non-blocking
I/O after the hand-off, which used to run the TLS 1.3 state machine on
the legacy connect or accept state. The hand-off clears tls1_3, since
wolfSSL_connect() and wolfSSL_accept() route on that flag: setting a
DTLS 1.3 session and then a DTLS 1.2 one left it set on a DTLS 1.2 SSL,
and the two entry points called each other until the stack overflowed.
The check only runs in builds with a pre-1.3 handshake.
Tests: both entry points, driven directly over memio, complete a DTLS
1.2 handshake after SSL-level and CTX-level masking, and a client given
a DTLS 1.3 session and then a DTLS 1.2 one completes a DTLS 1.2
handshake.1 parent ef8ffa0 commit 26da4b8
2 files changed
Lines changed: 128 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16680 | 16680 | | |
16681 | 16681 | | |
16682 | 16682 | | |
16683 | | - | |
16684 | | - | |
16685 | | - | |
16686 | | - | |
16687 | | - | |
16688 | | - | |
16689 | | - | |
16690 | | - | |
16691 | | - | |
| 16683 | + | |
| 16684 | + | |
| 16685 | + | |
| 16686 | + | |
| 16687 | + | |
| 16688 | + | |
| 16689 | + | |
| 16690 | + | |
| 16691 | + | |
16692 | 16692 | | |
16693 | | - | |
| 16693 | + | |
16694 | 16694 | | |
16695 | | - | |
16696 | | - | |
| 16695 | + | |
16697 | 16696 | | |
| 16697 | + | |
16698 | 16698 | | |
16699 | 16699 | | |
16700 | 16700 | | |
| |||
17976 | 17976 | | |
17977 | 17977 | | |
17978 | 17978 | | |
17979 | | - | |
17980 | | - | |
17981 | | - | |
17982 | | - | |
17983 | | - | |
17984 | | - | |
17985 | | - | |
17986 | | - | |
17987 | | - | |
17988 | | - | |
| 17979 | + | |
| 17980 | + | |
| 17981 | + | |
| 17982 | + | |
| 17983 | + | |
17989 | 17984 | | |
| 17985 | + | |
| 17986 | + | |
| 17987 | + | |
| 17988 | + | |
| 17989 | + | |
| 17990 | + | |
17990 | 17991 | | |
17991 | 17992 | | |
17992 | 17993 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16217 | 16217 | | |
16218 | 16218 | | |
16219 | 16219 | | |
| 16220 | + | |
| 16221 | + | |
| 16222 | + | |
| 16223 | + | |
| 16224 | + | |
| 16225 | + | |
| 16226 | + | |
| 16227 | + | |
| 16228 | + | |
| 16229 | + | |
| 16230 | + | |
| 16231 | + | |
| 16232 | + | |
| 16233 | + | |
| 16234 | + | |
| 16235 | + | |
| 16236 | + | |
| 16237 | + | |
| 16238 | + | |
| 16239 | + | |
| 16240 | + | |
| 16241 | + | |
| 16242 | + | |
| 16243 | + | |
| 16244 | + | |
| 16245 | + | |
| 16246 | + | |
| 16247 | + | |
| 16248 | + | |
| 16249 | + | |
| 16250 | + | |
| 16251 | + | |
| 16252 | + | |
| 16253 | + | |
| 16254 | + | |
| 16255 | + | |
| 16256 | + | |
| 16257 | + | |
| 16258 | + | |
| 16259 | + | |
| 16260 | + | |
| 16261 | + | |
| 16262 | + | |
| 16263 | + | |
| 16264 | + | |
| 16265 | + | |
| 16266 | + | |
| 16267 | + | |
| 16268 | + | |
| 16269 | + | |
| 16270 | + | |
| 16271 | + | |
| 16272 | + | |
| 16273 | + | |
| 16274 | + | |
| 16275 | + | |
| 16276 | + | |
| 16277 | + | |
| 16278 | + | |
| 16279 | + | |
| 16280 | + | |
| 16281 | + | |
| 16282 | + | |
| 16283 | + | |
| 16284 | + | |
| 16285 | + | |
| 16286 | + | |
| 16287 | + | |
| 16288 | + | |
| 16289 | + | |
| 16290 | + | |
| 16291 | + | |
| 16292 | + | |
| 16293 | + | |
| 16294 | + | |
| 16295 | + | |
| 16296 | + | |
| 16297 | + | |
| 16298 | + | |
| 16299 | + | |
| 16300 | + | |
| 16301 | + | |
| 16302 | + | |
| 16303 | + | |
| 16304 | + | |
| 16305 | + | |
| 16306 | + | |
| 16307 | + | |
| 16308 | + | |
| 16309 | + | |
| 16310 | + | |
| 16311 | + | |
| 16312 | + | |
| 16313 | + | |
| 16314 | + | |
| 16315 | + | |
| 16316 | + | |
| 16317 | + | |
| 16318 | + | |
| 16319 | + | |
16220 | 16320 | | |
16221 | 16321 | | |
16222 | 16322 | | |
| |||
16342 | 16442 | | |
16343 | 16443 | | |
16344 | 16444 | | |
| 16445 | + | |
| 16446 | + | |
| 16447 | + | |
| 16448 | + | |
| 16449 | + | |
16345 | 16450 | | |
16346 | 16451 | | |
16347 | 16452 | | |
| |||
0 commit comments