Commit graph

57 commits

Author SHA1 Message Date
Marten Seemann
469a6153b6
use a synchronous API for the crypto setup (#3939) 2023-07-21 10:00:42 -07:00
Marten Seemann
3d89e545d3
use the new crypto/tls QUIC Transport (#3860) 2023-07-01 11:15:00 -07:00
Marten Seemann
41ddaa0262
attach the QUIC version to context returned by ClientHelloInfo.Context (#3721) 2023-03-26 22:26:14 +09:00
Marten Seemann
58cedf7a4f
rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
Marten Seemann
95334202c5 fix decoding of packet numbers in different packet number spaces
When QUIC abandoned the "stream 0" design, it introduced separate
packet number spaces for packets with different encryption levels.
Packet number compression now also works per packet number space.
The current code doesn't lead to any problems if the peer starts sending
with packet number 0, as we only exchange a few packets in the Initial
and the Handshake packet number space and there's nothing to compress.
It might lead to problems if the peer starts with a large packet number
in one space (which is allowed by the spec), and then starts with a
small packet number in another packet number space.
2020-12-03 23:35:27 +07:00
Marten Seemann
c968b18a21 select the H3 ALPN based on the QUIC version in use (for the H3 server) 2020-10-29 13:44:23 +07:00
Marten Seemann
b9090d71ae rename cryptoSetup.DropHandshakeKeys() to SetHandshakeConfirmed() 2020-09-30 12:14:16 +07:00
Marten Seemann
9d4b4f6bf0 check that the peer updated its keys when acknowledging a key update 2020-09-15 13:37:48 +07:00
Marten Seemann
977dbc828c move all dependencies on qtls to a separate package 2020-08-18 14:26:23 +07:00
Marten Seemann
0ef4f06189 move the transport parameters from the handshake to the wire package 2020-03-13 16:20:11 +07:00
Marten Seemann
8cde4ab638 refactor how session tickets are sent
Previously, RunHandshake() would send the session tickets. Now, the
session initiates the sending of the session ticket. This simplifies the
setup a bit, and it will make it possible to include the RTT estimate in
the session ticket without accessing the RTTStats concurrently.
2020-02-10 17:42:09 +07:00
Marten Seemann
539097fc6e return a quic.ConnectionState from Session.ConnectionState() 2020-01-30 09:21:09 +07:00
Marten Seemann
9b0a4a8813 move unmarshaling of the transport parameters to the crypto setup 2020-01-01 18:04:01 +04:00
Marten Seemann
c5f74595ca receive 0-RTT sealers and openers from qtls when using 0-RTT 2019-12-30 18:39:21 +04:00
Marten Seemann
f7fd5d2848 drop Handshake keys as soon as the handshake completes (as a server) 2019-12-06 10:29:48 +07:00
Marten Seemann
3db60534cf use a sentinel error when a sealer is not yet available 2019-11-12 11:27:30 +07:00
Marten Seemann
416fe8364e remove unused return value from session constructor 2019-10-27 15:35:34 +07:00
Marten Seemann
bb48c9b31a pass the time a packet was received to the short header opener
This saves us one time.Now() syscall per received 1-RTT packet.
2019-08-11 13:33:02 +07:00
Marten Seemann
5a9c593463 rename the KeyPhase to KeyPhaseBit 2019-06-30 17:36:09 +07:00
Marten Seemann
73d5d83a1d pass the largest acked 1-RTT packet number to the crypto setup 2019-06-27 07:42:19 +08:00
Marten Seemann
c522bcc683 return a defined error when the AEAD cannot open a packet 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
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
743868159f use a callback to pass handshake errors to the session 2019-05-31 18:35:37 +08:00
Marten Seemann
2f6ab5aa5f remove unused handshake.ConnectionState struct definition 2019-05-31 15:00:34 +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
09574a6653 expose the tls.ConnectionState 2019-03-31 23:56:24 +09:00
Marten Seemann
26afc7a4ca remove the error return value when receiving TLS extensions 2019-02-07 12:43:29 +08:00
Marten Seemann
17f4ebad64 handle Retry packets in the session 2019-02-04 15:38:47 +08:00
Marten Seemann
2712626e66 move processing of transport parameters to the session 2019-02-02 09:24:37 +08:00
Marten Seemann
a95b7c2868 refactor how transport parameters are passed from the extension handler 2019-02-02 09:24:37 +08:00
Marten Seemann
5a68ba0a02 implement header encrytion and decryption for sealers and openers 2018-12-14 16:46:40 +06:30
Marten Seemann
67f923c736 return the Opener from the crypto setup 2018-12-14 16:46:40 +06:30
Marten Seemann
3266e36811 drop support for gQUIC 2018-10-30 10:20:39 +07:00
Marten Seemann
4a326ad00a implement closing of the TLS crypto setup
When the crypto setup is closed, the go rounine running the
qtls.Handshake() needs to return.
2018-10-29 15:05:58 +07:00
Marten Seemann
387c28d707 when the encryption level changes, reject data on that crypto stream
There are two checks that need to be performed:
1. the crypto stream must not have any more data queued for reading
2. when receiving CRYPTO frames for that crypto stream afterwards, they
must not exceed the highest offset received on that stream
2018-10-26 17:09:52 +07:00
Marten Seemann
19e5feef57 move TLS message header parsing logic to the crypto stream 2018-10-26 16:40:29 +07:00
Marten Seemann
2dbc29a5bd fix error handling in the TLS crypto setup
There are two ways that an error can occur during the handshake:
1. as a return value from qtls.Handshake()
2. when new data is passed to the crypto setup via HandleData()
We need to make sure that the RunHandshake() as well as HandleData()
both return if an error occurs at any step during the handshake.
2018-10-26 16:18:53 +07:00
Marten Seemann
82508f1562 use tls-tris instead of mint 2018-10-26 16:18:49 +07:00
Marten Seemann
f88b7bb175 implement the new Retry mechanism 2018-08-13 08:47:29 +07:00
Marten Seemann
302d2a1715 don't use trial decryption for IETF QUIC 2018-03-31 14:29:44 +07:00
Marten Seemann
6c1eba5848 generate the diversification nonce when creating the server crypto setup 2018-03-31 14:29:44 +07:00
Marten Seemann
c6526ad927 replace the SetDiversificationNonce crypto setup method by a chan 2018-03-31 14:29:44 +07:00
Marten Seemann
1cc209e4fb update mint, and adapt to the new use of the extension handler 2018-02-02 08:18:29 +08:00
Marten Seemann
66fd3b5195 expose the ConnectionState in the Session
The ConnectionState contains basic details about the QUIC connection.
2018-01-11 16:27:42 +07:00
Marten Seemann
25a6dc9654 implement stateless handling of Initial packets for the TLS server 2017-12-08 08:45:54 +07:00