1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-11-10 21:22:20 +03:00
Commit Graph

19 Commits

Author SHA1 Message Date
Amaury Séchet
2f8774c921 Only take a QuicServerConnectionState when constructing ServerHandshake (#90)
Summary:
The cryptoState can be derrived from it, so it is redundant to pass it.

This PR depends on https://github.com/facebookincubator/mvfst/issues/88
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/90

Reviewed By: mjoras

Differential Revision: D19622581

Pulled By: yangchi

fbshipit-source-id: b3c88999199673f69c4422b96fbe7f2b0656bf6c
2020-02-12 09:42:18 -08:00
Amaury Séchet
e6e6196c86 Move the delayed destruction from Handshake to QuicConnectionStateBase
Summary: Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/88

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

 ---
## Proxygen Canary
Traffic Canary: https://our.intern.facebook.com/intern/traffic/canary?fbid=224323975233396
* elb.prod.ham3c01 - binary_asan - 2020-02-05 02:00 - https://fburl.com/dyndash/u2q12hwq
* elb.prod.mia3c02 - binary - 2020-01-31 09:40 - https://fburl.com/dyndash/vmv34rpa
* elb.prod.otp1c01 - binary - 2020-02-05 02:26 - https://fburl.com/dyndash/0zttm61b
* flb.prod.fath4c02 - binary - 2020-02-05 02:26 - https://fburl.com/dyndash/6o1nqsti
* flb.prod.fgye3c01 - binary - 2020-01-31 09:40 - https://fburl.com/dyndash/nu3i5ahw
* olb.prod.rfrc0c01.p2 - binary - 2020-01-31 09:40 - https://fburl.com/dyndash/c1o6hpqw
* olb.prod.rftw0c01.p2 - binary - 2020-02-05 02:26 - https://fburl.com/dyndash/xg6qbyru
* slb.prod_regional.rcln0c00 - binary - 2020-02-05 02:26 - https://fburl.com/dyndash/e4qkbzcz
* slb.prod_regional.rfrc0c00 - binary - 2020-01-31 09:40 - https://fburl.com/dyndash/j0yxofty
* slb.prod_regional.rrva0c00 - binary_asan - 2020-02-05 02:00 - https://fburl.com/dyndash/4hsg02uj
* slb.regional.rfrc0c01.p2 - binary - 2020-01-31 09:40 - https://fburl.com/dyndash/1njxzbgf
* slb.regional.rvll0c01.p2 - binary - 2020-02-05 02:26 - https://fburl.com/dyndash/056xdmzn
 ---

Reviewed By: lnicco

Differential Revision: D19551142

Pulled By: mjoras

fbshipit-source-id: b0d14146d14384b8c37887b3e9d8fed7d6181d88
2020-02-05 06:13:33 -08:00
Amaury Séchet
7afddfff62 Remove folly::Optionnal wrapper around actionGuard_ (#87)
Summary:
It is purely redudant as DestructorGuard itself supports being "empty", casts to bool and everything.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/87

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

 ---
## Proxygen Canary
Traffic Canary: https://our.intern.facebook.com/intern/traffic/canary?fbid=197436651305586
* elb.prod.cdt1c01 - binary - 2020-01-22 14:08 - https://fburl.com/dyndash/5yb104wc
* flb.prod.fsac1c02 - binary - 2020-01-22 14:08 - https://fburl.com/dyndash/e5c751eq
* olb.prod.rpnb0c01.p2 - binary - 2020-01-22 14:08 - https://fburl.com/dyndash/oa8wb63p
* slb.prod_regional.rvll0c00 - binary - 2020-01-22 14:08 - https://fburl.com/dyndash/ufi1u27z
 ---

Reviewed By: sharma95

Differential Revision: D19517435

Pulled By: yangchi

fbshipit-source-id: 6c7e64a9db14ce1bbe28906bd7ff15eeed851e76
2020-01-22 22:03:42 -08:00
Udip Pant
74f98d4604 Move the fizz code into its own package
Summary:
This moves the fizz specific part of the handshake into its own folder and library.

There is a bit of smurf naming going on as a result, not sure it is worth fixing or not at this stage. Maybe this code should be a in namespace named quic::fizz .

This should be doable with the client as well as soon as the key cache situation is figured out.
 ---
## Proxygen Canary

Reviewed By: yangchi

Differential Revision: D19290919

fbshipit-source-id: 48d7f7c70db42c65f7dffe3256805c268a481198
2020-01-09 20:59:54 -08:00
Yang Chi
35d6bd714d De-boost::variant Fizz KeyScheduler secret type
Summary: to remove boost variant dependency, to reduce binary size

Reviewed By: siyengar

Differential Revision: D18513288

fbshipit-source-id: effe59d7e566c28bb33a5832ea521f60534955ec
2020-01-02 14:54:37 -08:00
Yang Chi
5ff9e224bd De-boost::variant Fizz client and server Action type
Summary:
Replace them with home cooked union based variant type to remove boost
dependencies.

Reviewed By: siyengar

Differential Revision: D18445458

fbshipit-source-id: a1804bb2dc316128e36c90e7cb575b690c906409
2020-01-02 14:54:36 -08:00
Amaury Séchet
fd48df2e6b Ressurect QuicFizzFactory (#70)
Summary:
Now that we actually have a place to put it.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/70

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

 ---
## Proxygen Canary
Traffic Canary: https://our.intern.facebook.com/intern/traffic/canary?fbid=150012342925497
* elb.prod.bog1c01 - binary - 2019-11-25 14:44 - https://fburl.com/dyndash/e0a7ztjh
* flb.prod.fbed1c02 - binary - 2019-11-25 14:44 - https://fburl.com/dyndash/un5zlmj3
* olb.prod.rpnb0c01 - binary - 2019-11-25 14:44 - https://fburl.com/dyndash/ixxpou7h
* slb.prod_regional.rodn0c00 - binary - 2019-11-25 14:44 - https://fburl.com/dyndash/858m1x46
* slb.regional.ratn0c01 - binary - 2019-11-25 14:44 - https://fburl.com/dyndash/pqemf15m
 ---

Reviewed By: sharma95

Differential Revision: D18619927

Pulled By: mjoras

fbshipit-source-id: 6ef07db48ec91dad6571f383c9dbea28c3cdb951
2019-11-26 03:42:19 -08:00
Amaury Séchet
a0ebc3995b Fusion QuicFizzFactory into FizzCryptoFactory (#44)
Summary:
They are strongly coupled, which indicate this is probably better to do it as one class.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/44

Reviewed By: mjoras

Differential Revision: D17590918

Pulled By: yangchi

fbshipit-source-id: 2eaca079fd760107eefd2b74fa612d7a0c8b3001
2019-10-08 22:17:02 -07:00
Subodh Iyengar
554c37a153 remove variant from serverhandshake
Summary: There is only one instance of the variant type for ServerHandshake, let's just remove it.

Reviewed By: yangchi

Differential Revision: D17247101

fbshipit-source-id: 1dd8f875b46889aefe92baad20adf90027823598
2019-09-19 17:31:47 -07:00
Luca Niccolini
cf842aab47 cleanup some unused includes and using
Reviewed By: yangchi

Differential Revision: D16976466

fbshipit-source-id: c1fc2ee0795997f498ac7431542bbfbf1f0d2fb2
2019-08-24 02:03:39 -07:00
Amaury Séchet
cbd77a3603 Extend CryptoFactory with makePacketNumberCipher (#40)
Summary:
The CryptoFactory is extended with makePacketNumberCipher . In order to support that feature, FizzCryptoFactory now explicitly takes a QuicFizzFactory as argument instead of a generic fizz::Factory, which is the only type that is used in practice anyways.

The cypher argument was removed because:
1/ Only one cypher is used at all. Fizz also supports ChaCha20, but using it in mvfst will throw an exception.
2/ it seems like the factory should know what cypher it is dealing with.

If a choice of cypher needs to be supported going forward, it can be done by adding state to FizzCryptoFactory.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/40

Reviewed By: mjoras

Differential Revision: D16785274

Pulled By: yangchi

fbshipit-source-id: a1c490e34c5ddd107e8e068d8b127c1ed00a59ec
2019-08-16 08:52:43 -07:00
Amaury Séchet
354506308f Update ServerHandshake to use a quic::Aead instead of fizz:Aead as soon as possible. (#35)
Summary:
Wrap the fizz::Aead as soon as fizz and it over to mvfst and use a quic::Aead everywhere else in ServerHandshake.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/35

Reviewed By: yangchi

Differential Revision: D16710820

Pulled By: mjoras

fbshipit-source-id: d6e3bee9f5baa0ebf6b3ef580de9e4614de8c4e5
2019-08-15 09:41:27 -07:00
Matt Joras
71ef54a859 Hardcode TLS_AES_128_GCM_SHA256 cipher support from QUIC.
Summary: This is the only cipher we support. Ideally we should have a proper list for this based on the existing fizz config, but for now just hardcode it so we aren't advertising ciphers in the handshake we don't support.

Reviewed By: JunqiWang

Differential Revision: D16444438

fbshipit-source-id: c89a8b5dcb85607304ad9e6fcbbad0864d2f5405
2019-07-23 13:26:48 -07:00
Amaury Séchet
f4e90017a3 Add mvfst specific encryption level (#26)
Summary:
This ensure a lot of code do not depend on fizz anymore.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/26

Reviewed By: mjoras, JunqiWang

Differential Revision: D16030663

Pulled By: yangchi

fbshipit-source-id: a3cc34905a6afb657da194e2166434425e7e163c
2019-06-27 14:09:04 -07:00
Amaury Séchet
d83cfb6c30 Decouple fizz::Aead and quic::Aead . This makes a large chunk of the codebase fizz agnostic. (#16)
Summary:
This is based on top of https://github.com/facebookincubator/mvfst/issues/15 .

Now that the codebase have been refactored to use Aead/fizz:Aead and MockAead/fizz::test::MockAead in proper places, it is time to ensures the aren't aliases of each others anymore.

This introduces FizzAead as a wrapper for fizz::Aead that implements quic::Aead and forward all calls. Most of the codebase now uses quic::Aead, which a significant step toward being able to swap it for another implementation.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/16

Reviewed By: yangchi

Differential Revision: D15474068

Pulled By: mjoras

fbshipit-source-id: 7cccc9909a45ea538409645644641e39a58bf81d
2019-06-18 16:29:29 -07:00
Bonnie Xu
2040a13e40 Handling TLS Alert and convert it to a Quic connection error.
Summary:
Handles TLS Alert and converts it to a Quic connection error.
See https://quicwg.org/base-drafts/draft-ietf-quic-tls.html#tls-errors for details.

Note that TLS_HANDSHAKE_FAILED is no longer part of the Initial QUIC Transport Error Codes Entries.
See https://quicwg.org/base-drafts/draft-ietf-quic-transport.html, Initial QUIC Transport Error Codes Entries.

Reviewed By: mjoras

Differential Revision: D15456385

fbshipit-source-id: cec3208f4a01bbd00af0bdd94b0e59dc3e400f28
2019-05-29 14:26:05 -07:00
Amaury Séchet
f26cd1f62d Add a bridge to fizz::Aead (#12)
Summary:
This introduce quic::Aead as a simple typedef to fizz::Aead and update the codebase to use quic::Aead . This should not impact the functionality of the code in any way.

This is a first step toward introducing an interface that is specific for mvfst so that mvfst can swap fizz for something else.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/12

Reviewed By: JunqiWang

Differential Revision: D15335324

Pulled By: mjoras

fbshipit-source-id: fef166a9a5c2cbae08ad9511d0abd749f330c221
2019-05-29 11:54:08 -07:00
Bonnie Xu
f4ae0a1efd Updated files to change syntax.
Summary: Changed existing chrono syntax to chrono_literals syntax.

Reviewed By: mjoras, sharma95

Differential Revision: D15374649

fbshipit-source-id: 40033e90cca226266ef85e4fec629f290bc5dae6
2019-05-20 12:10:46 -07:00
udippant
50d4939e9e Initial commit of mvfst 2019-04-22 23:42:46 -07:00