Commit Graph

5038 Commits

Author SHA1 Message Date
Marten Seemann
e9906b4d2b Merge pull request #2768 from lucas-clemente/reduce-handshake-drop-timeout
reduce the handshake timeout to two minutes in the handshake drop tests
2020-09-14 14:00:31 +07:00
Marten Seemann
654ec69f7c Merge pull request #2777 from lucas-clemente/fix-tls-handshake-message-handling
fix handling of multiple handshake messages in the case of errors
2020-09-14 13:59:22 +07:00
Marten Seemann
5045d5bb70 Merge pull request #2775 from lucas-clemente/more-linters
enable more linters, update golangci-lint to v1.31
2020-09-14 13:55:24 +07:00
Marten Seemann
bd0c8fca75 Merge pull request #2774 from lucas-clemente/increase-stream-deadline-test
increase the threshold for the receive stream deadline test
2020-09-14 13:55:05 +07:00
Marten Seemann
0abeffa75f Merge pull request #2779 from lucas-clemente/bytes-in-flight-assertion
add an assertion that bytes_in_flight never becomes negative
2020-09-14 13:54:34 +07:00
Marten Seemann
8ad6ef0c45 Merge pull request #2778 from lucas-clemente/fix-handshake-fuzz-race
fix race condition in handshake fuzz code
2020-09-14 13:54:19 +07:00
Marten Seemann
3ef77b0c1a add an assertion that bytes_in_flight never becomes negative 2020-09-14 10:32:32 +07:00
Marten Seemann
779c917450 fix race condition in handshake fuzz code 2020-09-13 23:15:36 +07:00
Marten Seemann
c9bfde9ac0 fix handling of multiple handshake messages in the case of errors
When receiving a handshake message after another handshake messages that
doesn't cause any action from the TLS stack (i.e. Certificate and
CertificateVerify), the handshake would run into a deadlock if the first
of these handshake messages caused an error in the TLS stack.

We need to make sure that we wait until a message has been fully
processed before proceeding with the handshake.
2020-09-13 20:13:57 +07:00
Marten Seemann
8bf5c782e3 Merge pull request #2746 from lucas-clemente/handshake-fuzz-tls-config
use more tls.Config options in the handshake fuzzer
2020-09-12 12:17:37 +07:00
Marten Seemann
382c923a67 use more tls.Config options in the handshake fuzzer 2020-09-12 11:55:09 +07:00
Marten Seemann
adadc06181 Merge pull request #2743 from lucas-clemente/handshake-fuzz-session-resumption
run two handshakes in the handshake fuzzer
2020-09-12 11:54:25 +07:00
Marten Seemann
4414060017 update golangci-lint to v1.31 2020-09-12 11:41:04 +07:00
Marten Seemann
5d24d3b68f enable the exportloopref linter 2020-09-12 11:38:52 +07:00
Marten Seemann
f886be4cce enable the gofmt linter 2020-09-12 11:26:37 +07:00
Marten Seemann
b944882337 enable the asciicheck linter 2020-09-12 11:23:19 +07:00
Marten Seemann
00861bde7f increase the threshold for the receive stream deadline test 2020-09-11 17:10:16 +07:00
Marten Seemann
88ff59a1b4 run two handshakes in the handshake fuzzer
This allows us to fuzz both session resuption and 0-RTT.
2020-09-11 17:04:21 +07:00
Marten Seemann
9a2062144e Merge pull request #2742 from lucas-clemente/handshake-fuzz-post-handshake-messages
send post-handshake message in the handshake fuzzer
2020-09-11 17:01:46 +07:00
Marten Seemann
7f2792506c Merge pull request #2773 from lucas-clemente/fix-qtls-alert-on-invalid-tls-version
close the connection when the client sends a TLS version < TLS 1.3
2020-09-11 12:28:19 +07:00
Marten Seemann
a603c0ad1a close the connection when the client sends a TLS version < TLS 1.3 2020-09-11 12:11:21 +07:00
Marten Seemann
021b355b47 Merge pull request #2754 from lucas-clemente/skip-packet-number-on-pto
skip a packet number when sending a 1-RTT PTO packet
2020-09-11 12:09:14 +07:00
Marten Seemann
8ea663d04a skip a packet number when sending a 1-RTT PTO packet 2020-09-11 11:16:48 +07:00
Marten Seemann
9605eddc23 Merge pull request #2753 from lucas-clemente/simplify-packet-number-skipping
save dummy packets in the packet history when skipping packet numbers
2020-09-11 11:16:09 +07:00
Marten Seemann
12c9427f43 save dummy packets in the packet history when skipping packet numbers 2020-09-11 11:01:30 +07:00
Marten Seemann
0044a69d73 also pass non-ack-eliciting packets to packet history (but don't save) 2020-09-11 11:01:29 +07:00
Marten Seemann
74f2610349 Merge pull request #2750 from lucas-clemente/rtt-measurement-for-lost-packets
delete unacknowledged packets from the packet history after 3 PTOs
2020-09-11 10:58:31 +07:00
Marten Seemann
8f4257a883 delete unacknowledged packets from the packet history after 3 PTOs 2020-09-10 18:51:05 +07:00
Marten Seemann
8cb0570cb1 use the KEY_UPDATE_ERROR code when the peer updates keys too frequently 2020-09-10 18:14:33 +07:00
Marten Seemann
10797cfc79 add the KEY_UPDATE_ERROR error code 2020-09-10 18:14:33 +07:00
Marten Seemann
309c578cb1 reduce the handshake timeout to two minutes in the handshake drop tests 2020-09-10 18:08:29 +07:00
klzgrad
c81eeb8bb8 add support for the HTTP CONNECT method (#2761) 2020-09-10 18:05:55 +07:00
Marten Seemann
1dc629ad69 don't set a timer to drop keys for key phase 0 2020-09-10 15:18:05 +07:00
Marten Seemann
a87fdf1a7d fix debug log messages for key updates 2020-09-10 14:58:22 +07:00
Marten Seemann
c5a132f158 Merge pull request #2762 from lucas-clemente/drop-old-keys-after-confirmed-key-update
don't drop keys for key phase N before receiving a N+1-protected packet
2020-09-10 11:35:39 +07:00
Marten Seemann
854940cecc don't drop keys for key phase N before receiving a N+1-protected packet 2020-09-10 11:11:59 +07:00
Marten Seemann
8c348c2d59 Merge pull request #2756 from lucas-clemente/handle-aead-errors
close session on errors unpacking errors other than decryption errors
2020-09-10 10:24:01 +07:00
Marten Seemann
67decc5df9 Merge pull request #2765 from lucas-clemente/log-key-retirements
log when an old 1-RTT key is retired
2020-09-10 10:23:02 +07:00
Marten Seemann
a528c4c4da close session on errors unpacking errors other than decryption errors 2020-09-09 23:59:24 +07:00
Marten Seemann
ca0f0a8ac2 Merge pull request #2757 from lucas-clemente/key-phase-error-on-successful-decryption
only return an invalid first key phase error for decryptable packets
2020-09-09 23:58:59 +07:00
Marten Seemann
074f5a202e log when old 1-RTT keys are dropped 2020-09-09 23:53:47 +07:00
Marten Seemann
dbaacd49bd add a logging event for dropping 1-RTT keys 2020-09-09 23:53:47 +07:00
Marten Seemann
9e1d65f4c9 Merge pull request #2764 from lucas-clemente/fix-local-key-update-logging
fix logging of locally initiated key updates
2020-09-09 23:52:52 +07:00
Marten Seemann
8e9ca5a186 Merge pull request #2744 from lucas-clemente/improve-timeout-test
test that both endpoints time out in the timeout integration test
2020-09-09 23:51:05 +07:00
Marten Seemann
a44c4f517f Merge pull request #2747 from lucas-clemente/simplify-sent-packet-history
refactor RTT measurements to simplify the sentPacketHistory
2020-09-09 23:50:26 +07:00
Marten Seemann
ade2882ef4 fix logging of locally initiated key updates 2020-09-09 23:22:10 +07:00
Marten Seemann
d89a446243 Merge pull request #2752 from lucas-clemente/fix-0rtt-packets-dropping
fix dropping of 0-RTT packets
2020-09-09 23:20:03 +07:00
Marten Seemann
6e1c756ec2 Merge pull request #2763 from lucas-clemente/always-qlog-1rtt-key-generation
always qlog the generation of 1-RTT key updates
2020-09-09 23:17:56 +07:00
Marten Seemann
391ebbe2db Merge pull request #2766 from lucas-clemente/move-logging-packet-header
move the PacketHeader struct from logging to qlog package
2020-09-09 23:17:15 +07:00
Marten Seemann
86124bbd32 Merge pull request #2751 from lucas-clemente/encryption-level-uint8
use a uint8 for the EncryptionLevel
2020-09-09 23:14:59 +07:00