Commit Graph

154 Commits

Author SHA1 Message Date
Marten Seemann
de05de297f Merge pull request #1739 from lucas-clemente/connection-state
set the ConnectionState
2019-01-17 09:14:24 +07:00
Marten Seemann
a84d626cd5 Merge pull request #1733 from lucas-clemente/remove-leftover-todo
remove leftover TODO in the crypto setup
2019-01-17 09:13:53 +07:00
Marten Seemann
4ba3aa0de8 set the ConnectionState 2019-01-14 11:55:07 +07:00
Marten Seemann
ad3f39a5d7 retrieve the handshake write key when receiving the ServerHello 2019-01-11 10:52:08 +07:00
Marten Seemann
337b9f9a93 remove leftover TODO in the crypto setup 2019-01-11 09:22:17 +07:00
Niklas Gustavsson
edecc88ebf Set is1RTT correctly for sealer/opener
Ensure that the rigth mask is picked for header protection.
2019-01-10 16:39:01 +01:00
Marten Seemann
6fbe8d563e Merge pull request #1713 from lucas-clemente/draft-test-vectors
use the test vectors from the draft
2019-01-07 10:18:57 +07:00
Marten Seemann
45458b3859 add the complete packet test vectors for initial packets 2019-01-07 09:11:49 +07:00
Marten Seemann
c0e9faa505 use the initial test vectors from the draft 2019-01-07 09:07:38 +07:00
Marten Seemann
b4356d7348 fix nonce usage in the AEAD, use the AEAD provided by qtls for Initials 2019-01-07 09:04:03 +07:00
Marten Seemann
e6d0ea630e Merge pull request #1718 from lucas-clemente/fix-session-queue
implement a queue of session waiting to be accepted
2019-01-07 08:45:22 +07:00
Marten Seemann
4294493a1a Merge pull request #1715 from lucas-clemente/fix-quic-ext-codepoint
fix quic_transport_parameters TLS extension code point
2019-01-07 08:43:30 +07:00
Marten Seemann
90514d53d1 reject new connection attempts if the server's accept queue is full 2019-01-06 15:26:43 +07:00
Marten Seemann
bbbeb7d32c update the HKDF labels 2019-01-05 18:01:02 +07:00
Marten Seemann
177c81610b rename packet number encryption to header encryption 2019-01-05 18:00:22 +07:00
Marten Seemann
0485090f9a fix quic_transport_parameters TLS extension code point 2019-01-05 16:23:27 +07:00
Marten Seemann
538b84b78d use the IV when sealing and opening 2018-12-29 16:11:27 +07:00
Marten Seemann
b1592d0616 use the draft-17 initial encryption 2018-12-27 16:50:42 +07:00
Marten Seemann
d6c304610d only queue packets for decryption if the opener is not yet available 2018-12-20 15:24:56 +06:30
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
d3611a014c implement initial header encryption key derivation 2018-12-14 16:46:40 +06:30
Marten Seemann
a80ca960e5 refactor initialization of the initial AEAD 2018-12-13 13:51:05 +06:30
Marten Seemann
4abcce6408 use a self-signed certificate for integration tests 2018-12-11 14:24:12 +06:30
Marten Seemann
4bf47870bc don't modify the tls.Config when generating the qtls.Config
This fixes a race conditions when dialing or accepting multiple
connections using the same tls.Config.
2018-11-27 11:17:13 +07:00
Marten Seemann
190d1dcc59 Merge pull request #1595 from lucas-clemente/fix-1529
authenticate retries
2018-11-12 18:00:22 +07:00
Marten Seemann
3ffea5d8c4 internalize the qerr package 2018-11-11 12:44:16 +07:00
Marten Seemann
70cb67bd2a check that the server sends the correct original_connection_id 2018-11-11 11:00:40 +07:00
Marten Seemann
73ca6a06eb encode the original connection ID into the cookie 2018-11-10 17:12:50 +07:00
Marten Seemann
8c103be876 simplify the crypto setup constructors 2018-11-10 17:01:13 +07:00
Marten Seemann
c2aac727b9 implement the original_connection_id transport parameter 2018-11-10 16:41:11 +07:00
Marten Seemann
6da4ef356f rename the initial stream limit transport parameters 2018-11-08 16:21:26 +07:00
Marten Seemann
f8612cda2c renumber the transport parameters 2018-11-08 16:19:45 +07:00
Marten Seemann
c302d8ff81 check the validity of transport parameters when unmarshalling 2018-11-05 15:37:22 +07:00
Marten Seemann
66a72a1199 use varints for numeric transport parameters 2018-11-05 12:33:32 +07:00
Marten Seemann
0fac716274 fix go routine leak in crypto setup test 2018-11-02 16:46:57 +07:00
Marten Seemann
9981026839 split the flow control transport parameters 2018-11-01 13:09:29 +07:00
Marten Seemann
a1acfc3045 rename {Stream,Connection}FlowControlWindow to InitialMax{Stream}Data 2018-10-30 12:52:42 +07:00
Marten Seemann
74c5e9a26c move the definition of transport parameter IDs 2018-10-30 10:37:33 +07:00
Marten Seemann
3266e36811 drop support for gQUIC 2018-10-30 10:20:39 +07:00
Marten Seemann
1227dc8a24 remove the handshakeCompleteChan from the TLS crypto setup
In TLS, we know that the handshake completed when RunHandshake() returns.
2018-10-29 17:33:06 +07:00
Marten Seemann
06f96f4b6e wait until the Handshake() go routine returned before returning Close() 2018-10-29 15:05:58 +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
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
74952a4331 check that every transport parameter is sent at most once 2018-10-24 23:33:37 +07:00