Commit Graph

711 Commits

Author SHA1 Message Date
Marten Seemann
305e37cd15 move header encryption / decryption to the updatable AEAD 2019-06-22 20:01:18 +08:00
Marten Seemann
d3ca8db521 refactor initialization of AEADs 2019-06-22 20:01:18 +08:00
Marten Seemann
0dd5a0b91f introduce a separate AEAD for short header crypto 2019-06-22 20:01:18 +08:00
Marten Seemann
598628d05b use separate opener interfaces for long and short header packets 2019-06-22 20:01:18 +08:00
Marten Seemann
b2d3ef691e use separate sealer interfaces for long and short header packets 2019-06-22 20:01:18 +08:00
Marten Seemann
c503769bcd use separate functions per encryption level to get sealers 2019-06-22 20:01:18 +08:00
Marten Seemann
d4d3f09ee3 use separate functions per encryption level to get openers 2019-06-22 20:01:18 +08:00
Marten Seemann
14a31d49a0 add a type for the key phase and use it for header parsing and writing 2019-06-22 20:01:18 +08:00
Marten Seemann
2b8cece60a add a context to Session.Open{Uni}StreamSync 2019-06-22 19:37:21 +08:00
Marten Seemann
5550ba2c3b add a context to Session.Accept{Uni}Stream 2019-06-22 19:37:11 +08:00
Marten Seemann
d495b4bada remove unused function GetPacketNumberLength 2019-06-21 20:13:59 +08:00
Marten Seemann
fcb0d6cfdc record InSlowStart and InRecovery 2019-06-20 22:58:01 +08:00
Marten Seemann
7c7b1ba9c7 add tracing for lost packets 2019-06-20 22:58:01 +08:00
Marten Seemann
22cbb344af move the TransportState struct to the quictrace package
Prevents an import loop when passing the tracer to the ackhandler.
2019-06-20 22:58:01 +08:00
Marten Seemann
267d11ee66 add tracing for sent and received packets 2019-06-20 22:58:01 +08:00
Marten Seemann
147181786a use a varint for the error code in the RESET_STREAM frame 2019-06-14 17:38:27 +08:00
Marten Seemann
453aa23553 use a varint for the error code in the CONNECTION_CLOSE frame 2019-06-14 17:35:40 +08:00
Marten Seemann
857e4ae9a9 use stream numbers, not stream ids, in the stream maps 2019-06-05 20:01:51 +08:00
Marten Seemann
a8633a952c introduce a type for the stream number 2019-06-05 17:45:17 +08:00
Marten Seemann
0dd26f4a4c return the invalid stream ID if no streams are allowed 2019-06-05 15:17:30 +08:00
Marten Seemann
979ab75b3b require ALPN during the TLS handshake 2019-06-02 14:58:37 +08:00
Marten Seemann
74ddf326c1 Merge pull request #1943 from lucas-clemente/new-tokens
send NEW_TOKEN frames
2019-06-02 14:42:25 +08:00
Marten Seemann
314df9229c Merge pull request #1941 from lucas-clemente/post-handshake-errors
add error handling for post-handshake crypto messages
2019-06-02 14:26:05 +08:00
Marten Seemann
34543848f0 send a NEW_TOKEN from after completing the handshake (as a server) 2019-06-02 14:18:27 +08:00
Marten Seemann
784ed16d94 Merge pull request #1945 from lucas-clemente/fix-flaky-token-generator-test
fix flaky token generator test on CI
2019-06-02 14:14:25 +08:00
Marten Seemann
7c7bcede6c rename handshake.TokenGenerator.NewToken to NewRetryToken 2019-06-02 14:14:05 +08:00
Marten Seemann
17634d2fe5 error when receiving a post-handshake message with wrong encryption level 2019-06-02 14:10:51 +08:00
Marten Seemann
d4da26bdbd fix flaky token generator test on CI 2019-06-02 13:57:51 +08:00
Marten Seemann
1873503937 reduce the Retry token expiry time to 10 seconds
The expiry time used to be 24 hours before. The reason for this long
duration was that this included tokens that were issued to be used
between separate connections in gQUIC. At the moment, we are only
generating tokens for Retry packets, i.e. within a single connection.
They are therefore expected to be used within a single round trip.
2019-06-01 16:32:54 +08:00
Marten Seemann
6888eb8593 return an error when handling the NewSessionTicket failed 2019-06-01 13:01:49 +08:00
Marten Seemann
4e709efa2f Merge pull request #1939 from lucas-clemente/crypto-setup-error-signaling
improve error handling in the crypto setup
2019-05-31 19:30:43 +08:00
Marten Seemann
e361d3c5cd use a callback to signal completion of the handshake 2019-05-31 19:13:41 +08:00
Marten Seemann
4fd6a7cc99 use a struct to pass callbacks from the session to the crypto setup 2019-05-31 19:00:10 +08:00
Marten Seemann
3b4e552582 Merge pull request #1936 from lucas-clemente/token-timestamp
use a high resolution timestamp in the token
2019-05-31 18:57:51 +08:00
Marten Seemann
743868159f use a callback to pass handshake errors to the session 2019-05-31 18:35:37 +08:00
Marten Seemann
ed69ae2ce0 Merge pull request #1940 from lucas-clemente/unexpected-handshake-messages
fix crash when receiving unexpected handshake messages
2019-05-31 18:14:29 +08:00
Marten Seemann
002b36abf5 use a high resolution timestamp in the token 2019-05-31 18:13:11 +08:00
Marten Seemann
aa9ab41560 Merge pull request #1937 from lucas-clemente/fix-hrr-race
fix race condition in crypto setup when sending a HelloRetryRequest
2019-05-31 18:09:08 +08:00
Marten Seemann
6899eb3c86 Merge pull request #1938 from lucas-clemente/remove-unused-connection-state
remove unused handshake.ConnectionState struct definition
2019-05-31 18:08:03 +08:00
Marten Seemann
73bd91a093 fix crash when receiving unexpected handshake message 2019-05-31 18:04:44 +08:00
Marten Seemann
5d4a47a3f3 return a crypto error when receiving unexpected handshake messages 2019-05-31 17:57:07 +08:00
Marten Seemann
2f6ab5aa5f remove unused handshake.ConnectionState struct definition 2019-05-31 15:00:34 +08:00
Marten Seemann
0be4ee197f fix race condition in crypto setup when sending a HelloRetryRequest 2019-05-31 01:57:58 +08:00
Marten Seemann
1d6707325f name the quic.Cookie to quic.Token 2019-05-30 22:13:06 +08:00
Marten Seemann
06da72ae4e Merge pull request #1929 from lucas-clemente/drop-handshake-keys
drop Initial and Handshake keys when receiving the first 1-RTT ACK
2019-05-30 20:52:39 +08:00
Marten Seemann
8eda9306a6 Merge pull request #1934 from lucas-clemente/application-error-logging
fix logging of application errors
2019-05-30 18:08:51 +08:00
Marten Seemann
7a2ffb3ada Merge pull request #1930 from lucas-clemente/invalid-stream-id
introduce invalid stream ID to simplify the outgoing streams map
2019-05-30 18:07:39 +08:00
Marten Seemann
cd6047b58e fix logging of application errors 2019-05-30 17:15:19 +08:00
Marten Seemann
a4989c3d9c drop Initial and Handshake keys when receiving the first 1-RTT ACK 2019-05-30 14:19:26 +08:00
Marten Seemann
4834962cbd add a function to drop received packets of a certain encryption level 2019-05-30 14:19:11 +08:00