Marten Seemann
81985f44bd
move the STK expiration check to the cryptoSetup
2017-05-20 23:27:39 +08:00
Marten Seemann
e68e2d287a
pass remote address to cryptoSetupServer
2017-05-20 23:27:38 +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
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
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
b3419633a6
fix data race in server crypto setup
2017-05-06 23:43:43 +08:00
Marten Seemann
b305cd674f
make it possible to configure the QUIC versions for the server
2017-05-05 18:05:57 +08:00
Marten Seemann
3c223b22a2
include peer perspective in nullAEAD
...
ref #375
2017-04-27 18:05:24 +07:00
Lucas Clemente
013d7fdb30
Simplify code in a few places
...
Found by running `gosimple ./...`
2017-04-13 16:43:58 +02:00
Marten Seemann
19aad731ed
improve logging and tests of cryptoSetupServer
2017-03-22 19:23:48 +07: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
6d5c9776e9
send a Public Reset when receiving a CHLO with the FHL2 tag
...
Fixes #411 .
Chrome sends the FHL2 when it wants to perform a head-of-line blocking
experiment, introduced in QUIC version 36 (see
https://codereview.chromium.org/2115033002 ). We don’t support this
experiment. By sending a Public Reset when receiving this tag we force
Chrome to use the TCP fallback.
2017-03-20 12:35: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
9e147714ac
pack smaller packets as long as the encryption is not forward secure
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
6cb19e42a5
explicitly pass encryption level in the aeadChanges channel
2017-02-25 21:38:08 +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
cd465ae0b5
move utils.Stream to quic.Stream
2017-02-22 23:03:09 +07:00
Marten Seemann
7fe2a37c76
use byte-slice instead of net.IP for generating source address tokens
2017-02-22 23:03:07 +07:00
Marten Seemann
90983470e8
fix logging of REJs and SHLOs
2017-02-02 14:16:46 +07:00
Marten Seemann
a587af079d
improve the connection parameters manager for the client
2017-01-14 18:58:46 +07:00
Marten Seemann
f72fbc57a9
send connection parameters in CHLO
2017-01-14 18:52:24 +07:00
Marten Seemann
0535491f30
rename crypto.Signer to crypto.CertChain
2017-01-14 18:52:18 +07:00
Marten Seemann
731dd87872
also keys for the client in AESGCM key derivation
2017-01-14 18:52:15 +07:00
Marten Seemann
c03f15dfdd
add a method to set the diversification nonce in the CryptoSetup
2017-01-14 18:45:17 +07:00
Marten Seemann
23435253db
create CryptoSetup for the client, use it in the Session
2017-01-14 18:45:15 +07:00
Marten Seemann
2b7c67d297
create handshake.CryptoSetup interface
2017-01-14 18:45:14 +07:00