Commit Graph

2977 Commits

Author SHA1 Message Date
Marten Seemann
3266e36811 drop support for gQUIC 2018-10-30 10:20:39 +07:00
Marten Seemann
8f8ed03254 Merge pull request #1558 from lucas-clemente/remove-handshake-complete-chan
don't pass the handshakeCompleteChan to the TLS crypto setup
2018-10-29 18:05:31 +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
dd6436c093 Merge pull request #1557 from lucas-clemente/crypto-setup-close
close the TLS crypto setup when the session closes
2018-10-29 17:32:21 +07:00
Marten Seemann
8344dc8b64 close the TLS crypto setup when session closes 2018-10-29 15:06:41 +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
35c0721b88 Merge pull request #1559 from lucas-clemente/fix-vnp-test
make version negotiation tests work with only one supported versions
2018-10-29 15:04:31 +07:00
Marten Seemann
3b8fe49874 Merge pull request #1561 from lucas-clemente/add-acks-to-crypto-packets
add ACK frames to crypto packets
2018-10-29 14:59:53 +07:00
Marten Seemann
13ccdc759f Merge pull request #1556 from lucas-clemente/server-initial-retransmissions
allow the server to retransmit Initial packets
2018-10-29 14:57:19 +07:00
Marten Seemann
e470d71c3a add ACK frames to crypto packets 2018-10-29 13:34:32 +07:00
Marten Seemann
2d65c2016e make version negotiation tests work with only one supported versions 2018-10-29 10:42:15 +07:00
Marten Seemann
eeab7a5fca allow the server to retransmit Initial packets 2018-10-28 13:30:37 +07:00
Marten Seemann
7fe93a726f Merge pull request #1555 from lucas-clemente/remove-mint-syntax
remove leftover vendored mint/syntax
2018-10-26 20:33:23 +07:00
Marten Seemann
a54979a6ad Merge pull request #1552 from lucas-clemente/crypto-stream-empty-check
check that the crypto stream is empty when switching encryption levels
2018-10-26 17:59:36 +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
7c6141b1cc remove leftover vendored mint/syntax 2018-10-26 16:43:30 +07:00
Marten Seemann
fe442e4d19 use a mock crypto stream in the crypto stream manager tests 2018-10-26 16:40:29 +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
d1f49ad2d0 Merge pull request #1542 from lucas-clemente/crypto-frame
use a modified version of tls-tris instead of mint
2018-10-26 16:39:15 +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
5fc2e12038 make the outgoing streams map work with stream 0
Stream 0 is now a valid stream ID used for application data, so the
streams map must be able to (block on) opening this stream.
2018-10-26 16:11:25 +07:00
Marten Seemann
08008b680e make the incoming streams map work with stream 0
Stream 0 is now a valid stream ID used for application data, so the
streams map must be able to accept this stream.
2018-10-26 16:11:25 +07:00
Marten Seemann
3516780264 change the label and the context of HKDF-Expand-Label
This now uses the draft-14 test vectors from the QUIC WG wiki.
2018-10-26 16:11:25 +07:00
Marten Seemann
99c5d0df25 rename qhkdfExpand to hkdfExpandLabel, add hash parameter 2018-10-26 16:11:25 +07:00
Marten Seemann
454a01b2a0 introduce the IETF QUIC encryption levels 2018-10-26 16:11:25 +07:00
Marten Seemann
d2a52a1433 implement parsing, writing and logging of CRYPTO frames 2018-10-26 16:11:25 +07:00
Marten Seemann
a97536913b Merge pull request #1553 from lucas-clemente/unique-transport-parameters
check that every transport parameter is sent at most once
2018-10-25 10:15:44 +07:00
Marten Seemann
f507197d99 Merge pull request #1550 from lucas-clemente/fix-1530
only allow a single retry
2018-10-25 07:42:39 +07:00
Marten Seemann
a7f94d89b6 only allow a single retry 2018-10-24 23:48:33 +07:00
Marten Seemann
74952a4331 check that every transport parameter is sent at most once 2018-10-24 23:33:37 +07:00
Marten Seemann
cfc8a904d5 Merge pull request #1544 from lucas-clemente/optimize-timers
optimize stream deadline timers
2018-10-20 10:50:14 +09:00
Marten Seemann
e0a7b50edf use a time.Timer for write deadlines 2018-10-20 10:12:03 +09:00
Marten Seemann
d9edacf711 use a time.Timer for read deadlines 2018-10-18 18:01:03 +01:00
Marten Seemann
93c7eb94ce Merge pull request #1533 from lucas-clemente/split-packet-packers
split packet packers
2018-10-15 11:27:33 +02:00
Marten Seemann
9a8fc494da Merge pull request #1541 from lucas-clemente/fix-pn-gen
actually skip packet numbers
2018-10-15 11:26:29 +02:00
Marten Seemann
fbc3041e4d add logging for skipped packet numbers 2018-10-14 21:39:18 +01:00
Marten Seemann
b2aec3403e actually generate gaps in packet number space 2018-10-14 20:20:15 +02:00
Marten Seemann
788dbeb686 be more explicit about ignoring errors in the packet number generator 2018-10-14 20:15:50 +02:00
Marten Seemann
5df98dc389 split the packet packer into two structs, for gQUIC and for IETF QUIC 2018-10-09 23:05:23 +01:00
Marten Seemann
225106b58c Merge pull request #1540 from lucas-clemente/packet-packer-tests
improve the packet packer tests
2018-10-09 10:30:24 +02:00
Lucas Clemente
05abe81c50 Merge pull request #1538 from ludweeg/ludweeg/assignOp
simplify `x = x <op> ...` to `x <op>= ...`
2018-10-09 09:59:06 +02:00
Marten Seemann
b000c32796 use a mock sealing manager in the packet packer tests 2018-10-06 06:49:37 +02:00
Marten Seemann
c90b4d91d1 rename some variables in the packet packer tests 2018-10-06 06:49:37 +02:00
ludweeg
8ff3bf8ca6 simplify x = x <op> ... to x <op>= ... 2018-10-06 01:59:45 +03:00
Marten Seemann
085a777e05 Merge pull request #1537 from lucas-clemente/improve-client-hostname-handling
use tls.Config.ServerName for the passing the hostname around
2018-10-04 13:04:20 +02:00
Marten Seemann
c1f55ba910 use tls.Config.ServerName for the passing the hostname around 2018-10-02 14:47:18 -07:00