Lucas Clemente
723f86c725
Don't use GetConfigForClient on go < 1.8
2017-03-02 10:40:20 +01:00
Lucas Clemente
219ce60a5e
Call GetConfigForClient in tls.Config if present
2017-03-01 21:11:52 +01:00
Lucas Clemente
1bb4a26965
Fix reading of tls.Config certificates
...
This commit mostly copies the getCertificate function from crypto/tls to
align our certificate reading with the standard library.
Should fix #458 .
2017-03-01 18:33:05 +01:00
Marten Seemann
c26e2bba4b
Merge pull request #449 from lucas-clemente/new-fix-391
...
immediately switch to forward-secure crypto after sending the SHLO
2017-03-01 15:31:34 +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
b5c8c11c0c
switch to forward-secure encryption after sending the SHLO
2017-03-01 14:11:25 +07:00
Marten Seemann
936a29ff35
retransmit packets with the encryption level they were sent with
2017-03-01 14:11:25 +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
7d2922d7ab
save the encryption level of a sent packet in the SentPacketHandler
2017-03-01 14:09:50 +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
178c14f1d4
Merge pull request #454 from lucas-clemente/streamframesorter
...
accept overlapping stream data
2017-02-28 19:05:36 +07:00
Marten Seemann
e674016312
accept overlapping stream data
2017-02-28 18:34:15 +07:00
Marten Seemann
556efdc99d
code refactoring in streamFrameSorter
2017-02-28 18:34:15 +07:00
Marten Seemann
b8bc008ba9
simplify tests of the streamFrameSorter
2017-02-28 18:34:15 +07:00
Marten Seemann
4de80a6ef1
Merge pull request #456 from lucas-clemente/fix-455
...
decode H2 HeadersFrame in h2quic responseWriter tests
2017-02-28 18:33:14 +07:00
Marten Seemann
c1d57d6efe
decode H2 HeadersFrame in h2quic responseWriter tests
...
fixes #455
2017-02-28 11:05:51 +07:00
Marten Seemann
8ddbdf9630
Merge pull request #453 from lucas-clemente/fix-452
...
reject stream frames that overflow the offset
2017-02-27 16:49:25 +07:00
Marten Seemann
d1b1bd21e4
Merge pull request #451 from lucas-clemente/crypto-change-callback
...
explicitly pass encryption level in the aeadChanges channel
2017-02-27 16:45:22 +07:00
Marten Seemann
745d7b7e9f
reject stream frames that overflow the offset
...
fixes #452
2017-02-27 15:45:32 +07:00
Marten Seemann
6cb19e42a5
explicitly pass encryption level in the aeadChanges channel
2017-02-25 21:38:08 +07:00
Marten Seemann
20b2069d78
Merge pull request #447 from lucas-clemente/fix-446
...
prevent sending of unencrypted stream data on data streams
2017-02-25 17:01:24 +07:00
Lucas Clemente
5a3823a5db
Merge pull request #445 from lucas-clemente/close-remote
...
Remove stream.CloseRemote from public API
2017-02-25 10:42:58 +01:00
Marten Seemann
21d39c13e4
add more server tests
2017-02-25 12:03:35 +07:00
Marten Seemann
c1c0fac0b4
validate minimum packet size before sending a version negotiation packet
...
fixes #429
2017-02-25 11:28:33 +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
e69ade8f24
Merge pull request #442 from lucas-clemente/encryption-level
...
expose the encryption level of packets
2017-02-25 09:09:41 +07:00
Marten Seemann
b84e945868
log the encryption level of sent and received packets
2017-02-25 08:27:15 +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
a97faf0bea
reject unencrypted stream data on all streams except stream 1
...
fixes #440
2017-02-25 08:27:14 +07:00
Marten Seemann
f88cbd801b
store the encryption level in the unpacked packet
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
Lucas Clemente
b2177c92d8
remove stream.CloseRemote from public API
2017-02-24 18:44:40 +01:00
Marten Seemann
811bd20939
fix flaky client test
...
fixes #443
2017-02-24 14:27:29 +07:00
Marten Seemann
eb7a7f79f7
add tests for clientCryptoSetup Open and Seal methods
2017-02-24 11:42:41 +07:00
Marten Seemann
8282760847
fix concurrent map access in server test
2017-02-24 10:14:19 +07:00
Marten Seemann
e7ce35b455
fix flaky server ConnStateCallback tests
2017-02-24 10:03:12 +07:00
Marten Seemann
7109883a95
call the ConnStateCallback in the client for encryption level changes
...
fixes #439
2017-02-24 09:19:08 +07:00
Marten Seemann
820eb2e6ee
call the ConnStateCallback in the server for encryption level changes
...
ref #439
2017-02-24 08:42:49 +07:00
Marten Seemann
d0777fe7fa
Merge pull request #420 from lucas-clemente/new-api
...
improved API
2017-02-23 16:55:49 +07:00
Marten Seemann
f53055b9a0
return packet handling and connection errors in Dial
2017-02-23 11:56:53 +07:00
Marten Seemann
8bfeb2ea8d
return from Dial after conn is forward-secure, unless ConnState is given
2017-02-22 23:03:10 +07:00
Marten Seemann
6f27b7f70d
handle stream opening errors in h2quic client
2017-02-22 23:03:10 +07:00
Marten Seemann
8fd2ddf81c
properly close the client
2017-02-22 23:03:09 +07:00
Marten Seemann
8247454b0f
correctly handle connection errors in the client
2017-02-22 23:03:09 +07:00
Marten Seemann
96edca5219
privatize the client, only expose Dial functions
2017-02-22 23:03:09 +07:00
Marten Seemann
48dee2708e
implement a Serve method for the Listener
2017-02-22 23:03:09 +07:00
Marten Seemann
cd465ae0b5
move utils.Stream to quic.Stream
2017-02-22 23:03:09 +07:00