Commit Graph

97 Commits

Author SHA1 Message Date
Marten Seemann
996fad14f8 remove unsafe from the session tests for the crypto setup 2017-05-16 10:55:55 +08:00
Marten Seemann
cb8bea73c7 implement a non-forward-secure session 2017-05-16 00:56:08 +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
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
Lucas Clemente
e2a0d9f77c Remove several unused fields and symbols
Detected with `unused -exports=true ./...`
2017-04-05 21:46:33 +01:00
Marten Seemann
2903f9b238 return a lambda to for sealing a packet in the CryptoSetup 2017-03-22 16:52:00 +07:00
Marten Seemann
28c115fee1 drop support for QUIC 34
fixes #368
2017-03-19 20:57:28 +07:00
Marten Seemann
8c5e7818a0 retransmit the diversification nonce in the packet carrying the SHLO
The packet containing the SHLO is the only packet that is sent with
initial encryption. If it is lost, we need to make sure that the
diversification nonce is included in the PublicHeader, otherwise the
client will not be able to derive the keys for the forward-secure
encryption.
2017-03-01 15:11:01 +07:00
Marten Seemann
5e91f139ce add a method to pack a retransmission in the packetPacker 2017-03-01 14:11:21 +07:00
Marten Seemann
9e147714ac pack smaller packets as long as the encryption is not forward secure 2017-03-01 14:01:52 +07:00
Marten Seemann
d4b2b66273 change composeNextPacket function signature in packetPacker 2017-03-01 14:01:52 +07:00
Marten Seemann
599926e3cb add a method to force the encryption level when sealing a packet 2017-03-01 14:01:51 +07:00
Marten Seemann
88561ff8c7 prevent sending of unencrypted stream data on data streams
fixes #446
2017-02-25 10:13:34 +07:00
Marten Seemann
1bd1a9e0e5 store the encryption level that a packet was sent with 2017-02-25 08:27:15 +07:00
Marten Seemann
0c20f5e9b3 return the encryption level used for Sealing 2017-02-25 08:27:14 +07:00
Marten Seemann
a972c7a21e return the encryption level of a packet when decrypting it 2017-02-25 08:27:08 +07:00
Marten Seemann
d1c9d8e93d only send the client version number until the handshake is complete
fixes #426
2017-02-20 11:52:00 +07:00
Marten Seemann
a7afd72795 add a callback that is called when the crypto level changes 2017-01-14 18:54:18 +07:00
Marten Seemann
16da08a440 add client functionality to the streamsMap 2017-01-14 18:54:15 +07:00
Marten Seemann
6cb48aad71 send correct version number in PublicHeader 2017-01-14 18:52:25 +07:00
Marten Seemann
fece562b22 compose PublicHeader depending on perspective set in packetPacker 2017-01-14 18:52:12 +07:00
Marten Seemann
6c0a885a0e pass perspective to packetPacker 2017-01-14 18:45:16 +07:00
Marten Seemann
2b7c67d297 create handshake.CryptoSetup interface 2017-01-14 18:45:14 +07:00
Marten Seemann
c6c1233e98 simplify the packPacket method in the packetPacker 2017-01-11 00:13:52 +07:00
Marten Seemann
edf6ee3dfc implement a sophisticated ack algorithm
fixes #354
2017-01-09 15:01:44 +07:00
Marten Seemann
c12508c3c9 use a mock ConnectionParametersManager in quic tests 2016-12-08 21:50:10 +07:00
Marten Seemann
ebc053dbe0 create interface for the ConnectionParametersManager 2016-12-08 18:39:14 +07:00
Marten Seemann
5af50c8fd0 correctly read MIDS and MSPC parameter
fixes #367
2016-12-08 16:15:31 +07:00
Lucas Clemente
6bb89d4902 remove entropy from packet packer 2016-09-01 20:26:32 +02:00
Lucas Clemente
b032a07f70 remove ackhandlerlegacy and frames.AckFrameLegacy 2016-09-01 20:26:31 +02:00
Lucas Clemente
d76d86a7e1 fix detection of only-ack packets
ref #315
2016-09-01 20:24:19 +02:00
Marten Seemann
a8764d923e remove version 32 from tests
ref #215
2016-09-01 12:20:18 +02:00
Marten Seemann
eabd38238a never send 1-byte packet numbers 2016-08-25 12:34:55 +07:00
Marten Seemann
bca012cbde handle Frame.Write errors in packet packer 2016-08-17 18:10:23 +07:00
Marten Seemann
88e1e50efe only increase packet number when sending a packet in PacketPacker
fixes #288
2016-08-16 17:07:03 +07:00
Marten Seemann
78fab5c264 use PacketNumberGenerator in PacketPacker 2016-08-11 11:03:45 +02:00
Lucas Clemente
65663c3314 implement GetOrOpenStream in streamsMap 2016-08-08 20:51:57 +02:00
Marten Seemann
a796877b94 use StreamsMap in Session and StreamFramer
fixes #208
2016-08-05 19:30:28 +07:00
Lucas Clemente
44acb8ca82 remove session.maybeSendPacket, restrict small frame detection to ACKs
ref #217
2016-07-26 13:44:07 +02:00
Lucas Clemente
7adf760fa4 change streamFramer to pop as many stream frames as possible at once
ref #217
2016-07-26 13:42:30 +02:00
Lucas Clemente
91f1eb1561 re-enable BLOCKED frame sending
fixes #113, fixes #172, fixes #211
2016-07-09 14:37:16 +02:00
Lucas Clemente
87c1a2f004 remove sentPacketHandler from packetPacker 2016-07-08 18:21:46 +02:00
Lucas Clemente
d1e3b541d3 replace streamFrameQueue with just-in-time framing of written data
This commits replaces the stream frame queue with a framer which
requests data from the streams just when a frame is needed by the
packet packer. This simplifies a lot of things and allows some other
refactorings, see issue #83.

There are a few pending tests which will be fixed soon.
2016-07-08 18:21:44 +02:00
Marten Seemann
ef9baf67fc use FlowControlManager in StreamFrameQueue 2016-07-06 10:17:42 +02:00
Marten Seemann
e8e6c8922d handle stream level flow control in StreamFrameQueue 2016-07-06 10:17:40 +02:00
Marten Seemann
1786c952c5 fix duplicate and out-of-order ACK detection in SentPacketHandler
fixes #192
2016-06-26 16:15:34 +07:00
Marten Seemann
ab1db83134 pack QUIC 34 packets with the correct maximum size
fixes #187
2016-06-23 18:23:34 +07:00
Marten Seemann
eb03ed5334 rename AckHandler package to AckHandlerLegacy 2016-06-21 19:51:26 +07:00
Marten Seemann
288cb9e143 rename AckFrame to AckFrameLegacy 2016-06-21 19:51:26 +07:00
Marten Seemann
5651a7cfc1 pass QUIC version number to Frame.MinLength
ref #181
2016-06-19 13:43:58 +07:00