Commit graph

33 commits

Author SHA1 Message Date
Marten Seemann
b63c81f0bf try decrypting undecryptable packets when the encryption level changes
There's no need to do this asynchronously any more when using TLS.
2018-10-26 17:10:00 +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
5102294991 use separate chans to signal handshake events and handshake completion 2018-10-26 16:11:25 +07:00
Marten Seemann
77f5d30338 buffer writes to the crypto stream
mint performs a Write for every state change. This results in a lot of
small packets getting sent when using an unbuffered connection. By
buffering, we make sure that packets are filled up properly.
2018-08-13 08:47:29 +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
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
99a2853e7d remove non forward-secure dialing
This was broken for a long time, and won't be available when using the
TLS 1.3 handshake.
2018-01-02 23:26:55 +07:00
Marten Seemann
25a6dc9654 implement stateless handling of Initial packets for the TLS server 2017-12-08 08:45:54 +07:00
Marten Seemann
80a827f133 fix the crypto setup so that it works with the recent mint changes
mint now supports stateless retries, and requires that the cookie
protector is set in the mint.Config and returns a new alert when a
retry is performed.
2017-12-07 13:49:45 +07:00
Marten Seemann
683f244054 rename the Cleartext Long Header type to Handshake
This was recently changed in the draft.
2017-11-13 10:55:33 +08:00
Marten Seemann
3e6f66da79 rename the packet types according to recent draft changes 2017-11-02 18:31:04 +07:00
Marten Seemann
df13a0a970 implement the TLS Cookie extension 2017-11-02 16:45:43 +07:00
Marten Seemann
3f62ea8673 set the Long Header packet type based on the state of the handshake 2017-10-29 14:08:08 +07:00
Marten Seemann
3e39991e1e use the non-blocking of mint to cycle through the handshake 2017-10-27 22:54:40 +07:00
Marten Seemann
4f86995e48 encrypt unprotected packets with a connection-dependent key 2017-10-27 17:35:08 +07:00
Marten Seemann
9825ddb43a simplify the interaction with mint 2017-10-25 09:13:47 +07:00
Marten Seemann
282b423f7d pass the crypto stream to the crypto setup constructor
The crypto stream is opened during the session setup. Passing it to the
crypto setup directly helps simplify the constructor.
2017-10-25 09:13:47 +07:00
Marten Seemann
f3e9bf4332 remove the params negotiator 2017-10-20 18:08:21 +07:00
Marten Seemann
a136ceffeb implement the validation of the version negotiation for the client 2017-10-02 13:51:38 +07:00
Marten Seemann
e01eb322e4 implement the validation of the version negotiation for the server 2017-10-02 13:16:01 +07:00
Marten Seemann
a2988bce8d send versions in ClientHello and EncryptedExtensions TLS parameters
It only sends the right values now, but doesn't yet perform any
validation.
2017-10-02 12:50:17 +07:00
Marten Seemann
6f3d3919df use separate constructors for client and server for the TLS crypto setup 2017-10-02 11:11:42 +07:00
Marten Seemann
4cbdced106 send the transport parameters in the TLS handshake 2017-09-29 17:35:22 +07:00
Marten Seemann
c95f2054a8 rename the ConnectionParametersManager to ParamsNegotiator 2017-09-28 18:15:33 +07:00
Marten Seemann
ebb4150e63 separate connection parameters negotiation and gQUIC handshake parsing 2017-09-28 18:15:32 +07:00
Marten Seemann
95901cdee4 initialize the connection parameters manager in the crypto setup 2017-09-28 18:15:32 +07:00
Marten Seemann
e603715949 make handshake and crypto internal packages 2017-09-21 11:52:21 +07:00
Renamed from handshake/crypto_setup_tls.go (Browse further)