Commit graph

24 commits

Author SHA1 Message Date
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
94c48d371a indent header log entries using tabs, not spaces 2018-05-07 09:11:34 +09:00
Marten Seemann
596ef35a80 implement parsing and writing of the Payload Length Long Header field 2018-04-23 17:39:03 +09:00
Marten Seemann
0e58a679d6
Merge pull request #1319 from lucas-clemente/fix-1307
use different source and destination connection IDs
2018-04-23 17:29:45 +09:00
Marten Seemann
804eac7348 fix logging of version negotiation packets 2018-04-23 16:37:59 +09:00
Marten Seemann
fae32101a0 use different source and destination connection IDs 2018-04-23 15:23:01 +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
948eef3e42 create a logger interface and use it everywhere 2018-04-04 13:03:28 +07:00
Marten Seemann
b6ca910a52 implement the IETF draft 10 header changes 2018-03-05 19:13:37 +07:00
Marten Seemann
a4bc7362e0 fix IETF Version Negotiation Packet, it doesn't have a packet number 2018-02-23 14:20:47 +08:00
Marten Seemann
62b0d99dcd reject packets with version 0 sent by the client
Version 0 is an invalid version. For packets sent by the server, it is
used to identify the Version Negotiation Packet.
2017-12-08 09:14:41 +07:00
Marten Seemann
45e43ada40 implement the recent changes to the version negotiation packet 2017-12-06 08:40:43 +07:00
Marten Seemann
f440a65ef1 move the version field in front of the packet number in the long header
This was recently changed in the IETF draft.
2017-11-30 11:34:34 +07:00
Marten Seemann
4076ab587e add a string representation for the Long Header packet types 2017-11-22 15:57:22 -08: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
b40d249953 reject packets that use the wrong or unknown packet types 2017-11-02 20:47:02 +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
a65929f6cf add logging for the packet header 2017-10-27 22:56:41 +07:00
Marten Seemann
4556ad01e5 use the new packet header for connections using TLS 2017-10-27 16:54:47 +07:00
Marten Seemann
bbe9affa27 reject version negotiation packets with an empty version list 2017-10-27 16:51:59 +07:00
Marten Seemann
7cb8e87580 implement parsing of IETF Version Negotiation Packets 2017-10-27 16:51:57 +07:00
Marten Seemann
fad279cb75 implement parsing and writing of the IETF QUIC Header 2017-10-27 16:51:04 +07:00