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

24 Commits

Author SHA1 Message Date
Matt Joras
472e40a902 Implement handshake done and cipher dropping.
Summary: This implements the handshake done signal and also cipher dropping.

Reviewed By: yangchi

Differential Revision: D19584922

fbshipit-source-id: a98bec8f1076393b051ff65a2d8aae7d572b42f5
2020-02-27 12:25:52 -08:00
Amaury Séchet
9fc727fb96 Pass QuicClientConnectionState down to ClientHandshake (#95)
Summary:
This is similar to https://github.com/facebookincubator/mvfst/issues/88 except that in this case, QuicClientConnectionState is actually needed to move forward.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/95

Reviewed By: yangchi

Differential Revision: D19816034

Pulled By: mjoras

fbshipit-source-id: a57b7a4732e3d7918369f8febbf63bce40d18a6c
2020-02-11 09:23:43 -08:00
Amaury Séchet
1cf32345ba Add throwOnError facility to ClientHandshake so sbclasses can check the error_ field. (#92)
Summary:
This is a first step in a series of refactoring moving the fizz specific parts of the psk cache management in FizzCientHandshake.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/92

Reviewed By: mjoras

Differential Revision: D19699174

Pulled By: yangchi

fbshipit-source-id: 99c11da4c97e2f19874c1cedb23751c2392296cb
2020-02-10 12:26:04 -08:00
Amaury Séchet
3c91a0ee24 Remove various unecessary inclusion of fizz headersin the client code. (#83)
Summary:
The reduce unnecessary exposure of common code to fizz and hopefully gets us one step closer to complete separation.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/83

Reviewed By: sharma95

Differential Revision: D19386615

Pulled By: udippant

fbshipit-source-id: fc00dfb06630be54a42bc51ea4ee2c1d64270229
2020-01-14 21: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
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
bef27f3dfa Move fizz::client::State down to FizzClientHandshake (#73)
Summary:
This is the anarchist patch of the day.

Depends on https://github.com/facebookincubator/mvfst/issues/72
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/73

Reviewed By: mjoras

Differential Revision: D18688624

Pulled By: yangchi

fbshipit-source-id: fd2eb81e6547076228ea4828cb192730916b7e68
2019-12-02 21:06:41 -08:00
Amaury Séchet
3fa06149bb Move getApplicationProtocol down (#72)
Summary:
Move things that depends on fizz down to FizzClientHandshake.

Depends on https://github.com/facebookincubator/mvfst/issues/71
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/72

Reviewed By: mjoras

Differential Revision: D18688622

Pulled By: yangchi

fbshipit-source-id: 54999355dfd907903d91bf9bc50239fb84ac2428
2019-11-27 23:51:41 -08:00
Amaury Séchet
ae4219774d Move cipher computation down to FizzClientHandshake (#69)
Summary:
This helps moving more fizz specific feature to FizzClientHandshake.

Depends on https://github.com/facebookincubator/mvfst/issues/65 .
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/69

Reviewed By: sharma95

Differential Revision: D18596584

Pulled By: mjoras

fbshipit-source-id: 9a4bc759177735f15d6813a2ad4826244d758fcd
2019-11-19 18:58:15 -08:00
Amaury Séchet
2d5fbf572b Move all use of fizz::client::ClientStateMachine into FizzClientHandshake (#65)
Summary:
Starting to migrate fizz specific features to the fizz specific handshake class.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/65

Reviewed By: siyengar

Differential Revision: D18575268

Pulled By: mjoras

fbshipit-source-id: dc1a2f1705e28e1a7f857d9b026c8f15d735c455
2019-11-19 10:03:47 -08:00
Amaury Séchet
74c43417f7 Move ClientHandshake::connect down to FizzClientHandhsake::connect (#60)
Summary:
Start moving fizz specific features of ClientHandshake down to FizzClientHandhsake

Depends on https://github.com/facebookincubator/mvfst/issues/59
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/60

Reviewed By: siyengar, lnicco

Differential Revision: D18303962

Pulled By: mjoras

fbshipit-source-id: 66c5c224b522f3d5f5054cd73792cafb48e285d3
2019-11-07 15:20:35 -08:00
Amaury Séchet
4c48981867 Add facilities to compute ciphers in ClientHandshake. (#58)
Summary:
This separate the cipher management - which is generic - from the cipher construction - that is fizz specific.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/58

Reviewed By: sharma95

Differential Revision: D18044353

Pulled By: mjoras

fbshipit-source-id: eb498fa3dac1b1cd1678edbb6e1d250bc875fd2c
2019-10-23 13:34:25 -07:00
Amaury Séchet
c869462e3e Refactor ClientHandshake to extract fizz specific code in their own methods (#54)
Summary:
This is done in order to keep make sure they can be refactored into some fizz specific code, and that fizz independent code can be shared.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/54

Reviewed By: mjoras

Differential Revision: D17898100

Pulled By: lnicco

fbshipit-source-id: e5ee1b0ae6d241bb04763aac3688338d70aaeb0b
2019-10-16 11:45:48 -07:00
Amaury Séchet
cf6b652978 Make ActionMoveVisitor an implementation detail rather than a part of the API (#47)
Summary:
This is one more step toward isolating fizz specific code from the API. The elements that cannot be moved away can then be extracted into a pluggable component, at least that's the goal.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/47

Reviewed By: mjoras

Differential Revision: D17592394

Pulled By: yangchi

fbshipit-source-id: 7998a6cebea81221942ee9ee1cf49d89da3ebce0
2019-10-09 13:41:57 -07: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
Amaury Séchet
31744e5353 Remove ClientHandshake::getState() (#48)
Summary:
It is part of the public API and rely on fizz. Moreover, it is not used and therefore can be removed.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/48

Reviewed By: mjoras

Differential Revision: D17668100

Pulled By: yangchi

fbshipit-source-id: 6dc170ea6de5c0e333ce1c627bc3a272f3fbc2bf
2019-10-02 11:44:26 -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
f4b6631955 Update ClientHandshake to use a quic::Aead instead of fizz:Aead as soon as possible. (#34)
Summary:
Wrap the fizz::Aead as soon as fizz and it over to mvfst and use a quic::Aead everywhere else in ClientHandshake.
Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/34

Reviewed By: yangchi

Differential Revision: D16710812

Pulled By: mjoras

fbshipit-source-id: 9e6e342205367f84fa4dad6847db0207de245f89
2019-08-12 14:22:21 -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
udippant
50d4939e9e Initial commit of mvfst 2019-04-22 23:42:46 -07:00