Skip to content

Commit 8a94234

Browse files
anassinatormeta-codesync[bot]
authored andcommitted
Revert D91249170: reland "[quic] use XSecCryptoBridge behind JK flag for FizzServerHandshake and FizzCryptoFactory"
Differential Revision: D91249170 Original commit changeset: e7b8382bc15e Original Phabricator Diff: D91249170 fbshipit-source-id: 615567a63d5250e5c39697afa81774a7c91197df
1 parent 88281a7 commit 8a94234

File tree

6 files changed

+10
-33
lines changed

6 files changed

+10
-33
lines changed

quic/fizz/handshake/BUCK

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,38 @@ oncall("traffic_protocols")
55
mvfst_cpp_library(
66
name = "fizz_handshake",
77
srcs = [
8+
"FizzBridge.cpp",
89
"FizzCryptoFactory.cpp",
910
"FizzPacketNumberCipher.cpp",
1011
"FizzRetryIntegrityTagGenerator.cpp",
1112
"QuicFizzFactory.cpp",
1213
],
1314
headers = [
15+
"FizzBridge.h",
1416
"FizzCryptoFactory.h",
1517
"FizzPacketNumberCipher.h",
1618
"FizzRetryIntegrityTagGenerator.h",
1719
"FizzTransportParameters.h",
1820
"QuicFizzFactory.h",
1921
],
2022
deps = [
21-
":fizz_bridge",
2223
"//fizz/backend:openssl",
2324
"//fizz/crypto:crypto",
2425
"//fizz/crypto:utils",
25-
"//fizz/crypto/aead:aead",
2626
"//quic/common:optional",
2727
],
2828
exported_deps = [
29+
"//fizz/crypto/aead:aead",
2930
"//fizz/protocol:default_factory",
31+
"//fizz/protocol:types",
3032
"//fizz/record:record",
3133
"//folly/ssl:openssl_ptr_types",
34+
"//quic:constants",
3235
"//quic/codec:packet_number_cipher",
3336
"//quic/common:buf_util",
3437
"//quic/common:mvfst_logging",
35-
"//quic/fizz/handshake:fizz_bridge",
3638
"//quic/folly_utils:folly_utils",
39+
"//quic/handshake:aead",
3740
"//quic/handshake:handshake",
3841
"//quic/handshake:retry_integrity_tag_generator",
3942
"//quic/handshake:transport_parameters",
@@ -46,20 +49,3 @@ mvfst_cpp_library(
4649
}), # @fb-only
4750
}),
4851
)
49-
50-
mvfst_cpp_library(
51-
name = "fizz_bridge",
52-
srcs = [
53-
"FizzBridge.cpp",
54-
],
55-
headers = [
56-
"FizzBridge.h",
57-
],
58-
exported_deps = [
59-
"//fizz/crypto/aead:aead",
60-
"//fizz/protocol:types",
61-
"//quic:constants",
62-
"//quic/handshake:aead",
63-
"//quic/handshake:handshake",
64-
],
65-
)

quic/fizz/handshake/FizzCryptoFactory.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@
1010

1111
#include <quic/fizz/handshake/FizzBridge.h>
1212
#include <quic/fizz/handshake/FizzPacketNumberCipher.h>
13-
#include QUIC_DEFAULT_AEAD_HEADER
1413
#include <quic/handshake/HandshakeLayer.h>
1514

16-
using DefaultAead = QUIC_DEFAULT_AEAD;
17-
1815
namespace quic {
1916

2017
quic::Expected<BufPtr, QuicError> FizzCryptoFactory::makeInitialTrafficSecret(
@@ -65,7 +62,7 @@ FizzCryptoFactory::makeInitialAead(
6562
trafficKey.key = std::move(key);
6663
trafficKey.iv = std::move(iv);
6764
aead->setKey(std::move(trafficKey));
68-
return DefaultAead::wrap(std::move(aead));
65+
return FizzAead::wrap(std::move(aead));
6966
}
7067

7168
quic::Expected<std::unique_ptr<PacketNumberCipher>, QuicError>

quic/fizz/server/handshake/BUCK

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ mvfst_cpp_library(
1818
"//fizz/server:replay_cache",
1919
"//quic:constants",
2020
"//quic/common:mvfst_logging",
21-
"//quic/fizz/handshake:fizz_bridge",
2221
"//quic/server/state:server",
2322
],
2423
exported_deps = [

quic/fizz/server/handshake/FizzServerHandshake.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <quic/fizz/handshake/FizzBridge.h>
1313
#include <quic/fizz/server/handshake/AppToken.h>
1414
#include <quic/fizz/server/handshake/FizzServerQuicHandshakeContext.h>
15-
#include QUIC_DEFAULT_AEAD_HEADER
1615

1716
#include <fizz/protocol/Protocol.h>
1817
#include <fizz/server/ReplayCache.h>
@@ -23,8 +22,6 @@
2322
// QuicServerConnectionState.
2423
#include <quic/server/state/ServerStateMachine.h>
2524

26-
using DefaultAead = QUIC_DEFAULT_AEAD;
27-
2825
namespace fizz::server {
2926
struct ResumptionState;
3027
} // namespace fizz::server
@@ -107,7 +104,7 @@ void FizzServerHandshake::processSocketData(folly::IOBufQueue& queue) {
107104
}
108105

109106
std::unique_ptr<Aead> FizzServerHandshake::buildAead(ByteRange secret) {
110-
return DefaultAead::wrap(
107+
return FizzAead::wrap(
111108
fizz::Protocol::deriveRecordAeadWithLabel(
112109
*state_.context()->getFactory(),
113110
*state_.keyScheduler(),

quic/server/handshake/BUCK

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ mvfst_cpp_library(
1313
],
1414
deps = [
1515
"//quic/common:mvfst_logging",
16-
"//quic/fizz/handshake:fizz_bridge",
16+
"//quic/fizz/handshake:fizz_handshake",
1717
"//quic/state:stream_functions",
1818
],
1919
exported_deps = [

quic/somerge_defs.bzl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
Generated by xplat/cross_plat_devx/somerge_maps/compute_merge_maps.py
44
5-
@generated SignedSource<<59705d72257a5a17ab646a1f082b1431>>
5+
@generated SignedSource<<e53ca29040530de04fe934295124939f>>
66
"""
77

88
# Entry Points:
@@ -148,8 +148,6 @@ QUIC_NATIVE_LIBRARY_MERGE_MAP = [
148148
"fbsource//xplat/quic/fizz/client/handshake:psk_cacheAndroid$",
149149
"fbsource//xplat/quic/fizz/client/handshake:token_cache$",
150150
"fbsource//xplat/quic/fizz/client/handshake:token_cacheAndroid$",
151-
"fbsource//xplat/quic/fizz/handshake:fizz_bridge$",
152-
"fbsource//xplat/quic/fizz/handshake:fizz_bridgeAndroid$",
153151
"fbsource//xplat/quic/fizz/handshake:fizz_handshake$",
154152
"fbsource//xplat/quic/fizz/handshake:fizz_handshakeAndroid$",
155153
"fbsource//xplat/quic/flowcontrol:flow_control$",

0 commit comments

Comments
 (0)