Commit 816483d
authored
bugfix:
When TLSv1.3 is used, the server may send a NewSessionTicket message
after the handshake. While this message is ssl-layer data,
`tcpsock:sslhandshake` does not consume it.
In the implementation of `setkeepalive`, `recv` is used to confirm the
connection is still open and there is no unread data in the buffer. But
it treats the NewSessionTicket message as application layer data and
then `setkeepalive` fails with this error `connection in dubious state`.
In fact we don't need to peek here, because if the application data is
read successfully then the connection is going to be closed anyway.
Therefore, `c->recv` can be used instead which will consume the
ssl-layer data implicitly.setkeepalive failure on TLSv1.31 parent 8ec4f0b commit 816483d
2 files changed
+70
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5725 | 5725 | | |
5726 | 5726 | | |
5727 | 5727 | | |
5728 | | - | |
5729 | | - | |
| 5728 | + | |
5730 | 5729 | | |
5731 | 5730 | | |
5732 | 5731 | | |
| |||
5747 | 5746 | | |
5748 | 5747 | | |
5749 | 5748 | | |
5750 | | - | |
5751 | | - | |
5752 | | - | |
5753 | | - | |
5754 | | - | |
5755 | | - | |
5756 | | - | |
5757 | | - | |
5758 | | - | |
5759 | | - | |
5760 | | - | |
5761 | | - | |
| 5749 | + | |
| 5750 | + | |
5762 | 5751 | | |
5763 | | - | |
| 5752 | + | |
5764 | 5753 | | |
5765 | 5754 | | |
5766 | 5755 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
4497 | 4499 | | |
4498 | 4500 | | |
4499 | 4501 | | |
| 4502 | + | |
| 4503 | + | |
| 4504 | + | |
| 4505 | + | |
| 4506 | + | |
| 4507 | + | |
| 4508 | + | |
| 4509 | + | |
| 4510 | + | |
| 4511 | + | |
| 4512 | + | |
| 4513 | + | |
| 4514 | + | |
| 4515 | + | |
| 4516 | + | |
| 4517 | + | |
| 4518 | + | |
| 4519 | + | |
| 4520 | + | |
| 4521 | + | |
| 4522 | + | |
| 4523 | + | |
| 4524 | + | |
| 4525 | + | |
| 4526 | + | |
| 4527 | + | |
| 4528 | + | |
| 4529 | + | |
| 4530 | + | |
| 4531 | + | |
| 4532 | + | |
| 4533 | + | |
| 4534 | + | |
| 4535 | + | |
| 4536 | + | |
| 4537 | + | |
| 4538 | + | |
| 4539 | + | |
| 4540 | + | |
| 4541 | + | |
| 4542 | + | |
| 4543 | + | |
| 4544 | + | |
| 4545 | + | |
| 4546 | + | |
| 4547 | + | |
| 4548 | + | |
| 4549 | + | |
| 4550 | + | |
| 4551 | + | |
| 4552 | + | |
| 4553 | + | |
| 4554 | + | |
| 4555 | + | |
| 4556 | + | |
| 4557 | + | |
| 4558 | + | |
| 4559 | + | |
| 4560 | + | |
| 4561 | + | |
| 4562 | + | |
| 4563 | + | |
| 4564 | + | |
| 4565 | + | |
0 commit comments