Commit Graph

1569 Commits

Author SHA1 Message Date
Marten Seemann
74f607ce21 implement DialAddrNonFWSecure for the client 2017-05-16 00:56:09 +08:00
Marten Seemann
33a9b5aae4 add more tests for Dial in the h2quic client 2017-05-16 00:56:09 +08:00
Marten Seemann
9fad63ff50 improve client tests
Use a mock newClientSession. That way, it’s a lot easier to test dialing
new connections.
2017-05-16 00:56:09 +08:00
Marten Seemann
8ba1bd817f move client session tests to separate place 2017-05-16 00:56:09 +08:00
Marten Seemann
889d3b38f8 remove the cryptoChangeCallback from the server 2017-05-16 00:56:09 +08:00
Marten Seemann
2bfa7e59cb implement DialNonFWSecure for the client 2017-05-16 00:56:09 +08:00
Marten Seemann
e6aeb143a7 simplify the blocking logic for the non-forward-secure session 2017-05-16 00:56:08 +08:00
Marten Seemann
cb8bea73c7 implement a non-forward-secure session 2017-05-16 00:56:08 +08:00
Marten Seemann
fb77a79b2b close the response chan on header stream erros in h2quic client 2017-05-16 00:56:08 +08:00
Marten Seemann
b7d7a8447d remove the ConnState and the ConnStateCallback from the quic.Config 2017-05-16 00:56:08 +08:00
Marten Seemann
612323985b remove the ConnStateCallback from the client
Dial and DialAddr return once the connection is forward secure. There is
currently no option to get the session earlier, this will be added later.
2017-05-16 00:56:02 +08:00
Marten Seemann
30a0211243 implement a Listener.Accept() method 2017-05-15 20:37:29 +08:00
Marten Seemann
0bd3b61e6a Merge pull request #616 from lucas-clemente/fix-614
properly handle errors that occur while handling packets in the session
2017-05-15 20:21:38 +08:00
Marten Seemann
cf90f4d00d Merge pull request #617 from lucas-clemente/fix-615
return an error when calling OpenStream after the session was closed
2017-05-15 19:55:51 +08:00
Marten Seemann
ba16a80864 return an error when calling OpenStream after the session was closed
fixes #615
2017-05-14 13:56:38 +08:00
Marten Seemann
4fd410700d properly handle errors that occur while handling packets in the session
fixes #614
2017-05-14 10:05:15 +08:00
Marten Seemann
222ffa2f48 Merge pull request #606 from lucas-clemente/truncate-connid
add a quic.Config option to request connection ID truncation
2017-05-13 17:39:12 +08:00
Marten Seemann
9fbec90ced enable connection ID truncation for the h2quic client 2017-05-13 17:19:57 +08:00
Marten Seemann
7a18b870e8 add a quic.Config option to ask the server to truncate the connection ID 2017-05-13 17:19:09 +08:00
Marten Seemann
650af86c70 pass the quic.Config to the session 2017-05-13 17:08:15 +08:00
Lucas Clemente
22a9a8221c Merge pull request #612 from Eichhoernchen/master
Added parsing of PUBS tag and filtering according to KEXS
2017-05-12 15:32:08 +02:00
Jan Rüth
4983119be5 added test to verify C255 KEXS's PUBs must not be the first thing in the public values 2017-05-12 15:02:38 +02:00
Jan Rüth
7465ee128d removed parenthesis and added more detailed error description 2017-05-12 14:14:27 +02:00
Jan Rüth
6a0b2d04d6 Added tests to check if PUBS is invalid and made sure a valid PUBS is requested by default 2017-05-11 21:15:52 +02:00
Jan Rüth
f558bdebed Added parsing of PUBS tag and filtering according to KEXS
This now allows quic-go to contact servers announcing multiple KEXS methods, e.g. like Akamai.
2017-05-11 19:54:49 +02:00
Marten Seemann
6628994883 Merge pull request #610 from lucas-clemente/fix-609
fix a race condition in the client crypto setup
2017-05-11 23:25:51 +08:00
Marten Seemann
adc4ef464a simplify the CryptoSetup.SetDiversificationNonce interface
Pass the diversification nonce via a channel instead of setting it
directly. That way there is no need to protect the diversificationNonce
member by a mutex. Also prevents a possible deadlock that occurred when
SetDiversificationNonce was called before maybeUpgradeCrypto returned.
2017-05-11 21:56:41 +08:00
Marten Seemann
8c4fe4ff80 fix race when setting the diversification nonce in clientCryptoSetup 2017-05-11 21:56:35 +08:00
Marten Seemann
df5ce0f6ae print handshake messages in sorted order
The sorting is not alphabetical, but by tag value. While this is not
perfect, it makes comparing two messages easier, since the values don’t
appear in random order.
2017-05-11 21:31:33 +08:00
Marten Seemann
acbd14f940 implement a HandshakeMessage struct
This makes passing handshake messages around easier, since it’s now one
struct instead of one message tag and one data map.
2017-05-11 21:31:31 +08:00
Marten Seemann
77c4d6aa4e remove unused TeeReader in cryptoSetupClient 2017-05-10 18:58:48 +08:00
Marten Seemann
fe364bfe07 Merge pull request #608 from lucas-clemente/better-close
send ConnectionCloses and PublicReset from the session run loop
2017-05-10 18:57:01 +08:00
Marten Seemann
69d5f3c262 send ConnectionCloses and PublicReset from the session run loop
This avoids several race conditions that can occur when trying to pack
packets and to write to the underlying connection concurrently.
2017-05-10 15:38:40 +08:00
Marten Seemann
75308ab56e improve runClosed channel semantics in session 2017-05-10 11:32:57 +08:00
Marten Seemann
db8fb356bc Merge pull request #595 from lucas-clemente/remove-handshake-complete
replace CryptoSetup.HandshakeComplete() by closing the aeadChanged channel
2017-05-09 19:36:17 +08:00
Marten Seemann
86c408e4bc Merge pull request #604 from lucas-clemente/fix-603
fix flaky session test
2017-05-09 18:59:00 +08:00
Marten Seemann
8a0ab02c6c Merge pull request #602 from lucas-clemente/fix-546
fix flaky session test
2017-05-09 18:51:09 +08:00
Marten Seemann
ab613c3ab0 use a directed aeadChanged chan in the session 2017-05-09 18:42:49 +08:00
Marten Seemann
3a357369b0 use a directed aeadChanged chan in the crypto setups 2017-05-09 18:41:40 +08:00
Marten Seemann
0a6a9551f8 close the aeadChanged chan when the handshake completes
This allows us to remove HandshakeComplete() from the CryptoSetup
interface. It also provides a signal to the session when the handshake
completes.
2017-05-09 18:40:23 +08:00
Marten Seemann
2e0f5473a0 Merge pull request #577 from lucas-clemente/fix-565
add a quic.Config option for QUIC versions
2017-05-09 18:30:04 +08:00
Marten Seemann
643f9df62b Merge pull request #594 from lucas-clemente/crypto-setup-races
fix minor data races in both server and client crypto setups
2017-05-09 18:27:35 +08:00
Marten Seemann
fd99c83591 Merge pull request #599 from lucas-clemente/fix-598
fix infinite loop in session test
2017-05-09 18:27:16 +08:00
Marten Seemann
e9db78ace3 fix flaky session test
fixes #603
This test can be simplified (and made race-free) by using that
session.run() now returns an error.
2017-05-09 14:43:18 +08:00
Marten Seemann
fc4e49b1c1 fix flaky session test
fixes #546
2017-05-09 14:14:38 +08:00
Marten Seemann
ab88e9472d fix infinite loop in session test
fixes #598
The mockReceivedPacketHandler returned the same ACK frame over and over
again, so that the loop in session.sendPacket() would send packets
containing this packet indefinitely.
2017-05-09 12:15:21 +08:00
Marten Seemann
2014ced934 fix data race in client crypto setup 2017-05-06 23:44:15 +08:00
Marten Seemann
b3419633a6 fix data race in server crypto setup 2017-05-06 23:43:43 +08:00
Marten Seemann
a5a41d06e6 add a Changelog entry for the Versions quic.Config option 2017-05-05 18:07:17 +08:00
Marten Seemann
55fa713eac simplify the signature of the version selection 2017-05-05 18:07:17 +08:00