Marten Seemann
f26a68d45c
implement dial functions that use a context
2018-06-14 16:15:32 +07:00
Marten Seemann
d7dee33bc7
change the source connection ID when creating a new IETF QUIC session
2018-05-30 21:37:05 +08:00
Marten Seemann
733e2e952b
use callbacks for signaling the session status
...
Instead of exposing a session.handshakeStatus() <-chan error, it's
easier to pass a callback to the session which is called when the
handshake is done.
The removeConnectionID callback is in preparation for IETF QUIC, where a
connection can have multiple connection IDs over its lifetime.
2018-05-29 21:27:08 +08:00
Marten Seemann
c7119b2adf
move logging of connection closing to the session
2018-05-29 21:24:24 +08:00
Marten Seemann
6b82e46e0c
use the prefix logger for client, server and proxy
2018-05-29 20:52:54 +08:00
Marten Seemann
5142b73ac3
Merge pull request #1370 from lucas-clemente/client-header-parsing
...
parse headers sent by the server without knowing the version
2018-05-29 16:43:52 +08:00
Marten Seemann
372463db49
don't pass the client's version to the header parser
2018-05-21 11:27:15 +08:00
Marten Seemann
c98afd6625
simplify version negotiation in the client
2018-05-15 11:02:21 +09:00
Marten Seemann
8f2fed1b10
parse IETF headers independent of the sender's perspective
...
The IETF header format allows parsing of the header without knowing
which peer sent the packet.
2018-05-09 13:28:30 +09:00
Marten Seemann
683b5823e4
handle gQUIC and IETF QUIC packets separately in the client
2018-05-08 15:17:16 +09:00
Marten Seemann
cc536fb895
cut packets at the payload length when receiving
2018-04-23 17:47:17 +09:00
Marten Seemann
fae32101a0
use different source and destination connection IDs
2018-04-23 15:23:01 +09:00
Marten Seemann
dd5d376d94
improve packet handling in the client
2018-04-23 11:40:25 +09:00
Marten Seemann
d47124d14d
add more methods to the protocol.ConnectionID
...
This will make it easier to change the underlying type of the connection
ID (potentially an array is faster than a byte slice).
2018-04-19 16:08:06 +09:00
Marten Seemann
52d31dd7ef
implement the new header format
...
Currently, we're only sending and accepting packets with matching source
and destination connection IDs.
2018-04-19 13:46:54 +09:00
Marten Seemann
1a035a265c
change the type of Connection ID to byte slice
2018-04-18 22:41:24 +09:00
Marten Seemann
af8971d8c9
move connection ID generation from the utils to the protocol package
2018-04-17 20:21:06 +09:00
Marten Seemann
948eef3e42
create a logger interface and use it everywhere
2018-04-04 13:03:28 +07:00
Marten Seemann
b40942d39e
send stream counts, not stream IDs, in the transport parameters
2018-03-16 17:41:21 +00:00
Marten Seemann
624ac61412
reject unknown versions in the quic.Config
2018-02-26 11:07:06 +08:00
Marten Seemann
58b20c6009
make the number of incoming streams configurable, for IETF QUIC
2018-02-23 22:15:31 +08:00
Marten Seemann
07b8821ef7
use pointer to byte slices in the buffer pool
...
https://staticcheck.io/docs/staticcheck#SA6002 suggests to use pointers
to objects in the sync.Pool.
2018-02-23 18:57:12 +08:00
Marten Seemann
ce01e99ba1
log version negotiation packets
2018-02-21 14:55:33 +08:00
Marten Seemann
8e332c2e13
implement sending of MAX_STREAM_ID frames
...
We can now impose a limit on the number of stream for IETF QUIC, and
advertise that in the transport parameters during the handshake.
2018-02-06 08:32:16 +08:00
Marten Seemann
cd4bcda458
read and write the stream id limits sent in the TLS handshake
2018-02-06 08:30:57 +08: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
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
2a0b71c66b
fix race when dialing a new connection
...
When a connection error occurs, Dial can only return the error if the
session is closed with that error. Therefore, the session must be
created before client.listen() is called.
2017-12-21 13:25:49 +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
57c6f3ceb5
don't return the handshakeChan from the session constructor
2017-12-08 07:34:57 +07:00
Marten Seemann
45e43ada40
implement the recent changes to the version negotiation packet
2017-12-06 08:40:43 +07:00
Marten Seemann
5d4174b2f0
parse the packet header before getting the session from the session map
2017-11-10 08:48:45 +07:00
Marten Seemann
a1a4f35096
send initial version in the CHLO, not the current version
...
This commit fixes two bugs:
1. In the CHLO, we need to send the initial QUIC version. It will differ
from the current version if version negotiation was performed.
2. The session setup was using the wrong version (current version, and
not the initial version), such that we would have sent the wrong version
in the TLS handshake as well.
2017-11-02 21:51:51 +07:00
Marten Seemann
96f65f922f
Merge pull request #927 from lucas-clemente/fix-925
...
fix client handshake failure when the server supports unknown versions
2017-11-02 21:34:04 +07:00
Marten Seemann
93703f8a4a
fix logging of unparseable PUBLIC_RESETs
2017-11-02 20:44:59 +07:00
Marten Seemann
43c23ff5fa
fix client handshake failure when the server supports unknown versions
2017-11-02 17:41:06 +07:00
Marten Seemann
fc3087fab3
handle IETF draft style Version Negotiation Packets
2017-10-29 16:47:15 +07:00
Marten Seemann
4556ad01e5
use the new packet header for connections using TLS
2017-10-27 16:54:47 +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
9cb7480050
rename connection ID truncation to connection ID omission
2017-09-29 22:52:54 +07:00
Marten Seemann
6dde979f8f
implement a string representation of the version number
...
This will be useful as soon as we start supporting non-gQUIC versions.
2017-09-28 15:19:12 +07:00
Marten Seemann
f921c961fc
fix encryption level bug check in the client
2017-09-25 14:22:50 +07:00
Marten Seemann
8312e766ed
define a function to tell if a QUIC version uses the TLS 1.3 handshake
2017-09-22 19:47:08 +07:00
Marten Seemann
84f3ec5343
reject packets with the wrong connection ID in the client
2017-09-21 10:35:54 +07:00
Marten Seemann
ca5a8d0792
reject packets with truncated connection ID, if truncation was disabled
2017-09-16 13:53:42 +07:00
Marten Seemann
416298577d
only accept one version negotiation packet
2017-09-16 12:58:22 +07:00
Marten Seemann
7003450d2b
fix version negotiation
2017-09-15 17:28:03 +07:00
Marten Seemann
91b7404182
implement a very basic TLS 1.3 handshake
2017-09-08 12:04:45 +03:00
Marten Seemann
f1ada87dcf
make the protocol package internal
2017-08-30 00:19:44 +07:00
Marten Seemann
524ecb5827
move the Public Reset to the wire package
2017-08-29 23:58:27 +07:00