Skip to content

Commit

Permalink
Narrow secret sample fields to appropriate bit width
Browse files Browse the repository at this point in the history
Summary: Narrows secret_len and NSS_secret_label to u8 from u64.

Reviewed By: mingtaoy

Differential Revision: D64866451

fbshipit-source-id: 17a98cc0742c8fd91fc67ad4441b8090c3ba135c
  • Loading branch information
Nick Richardson authored and facebook-github-bot committed Nov 15, 2024
1 parent fd1a777 commit ee77520
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion third-party/fizz/src/fizz/client/AsyncFizzClient-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,8 @@ template <typename SM>
void AsyncFizzClientT<SM>::ActionMoveVisitor::operator()(
SecretAvailable& secret) {
fizz_probe_secret_available(
secret.secret.secret.size(),
secret.secret.secret.data(),
secret.secret.secret.size(),
KeyLogWriter::secretToNSSLabel(secret.secret.type)
.value_or(std::numeric_limits<KeyLogWriter::Label>::max()),
client_.getClientRandom()->data());
Expand Down
2 changes: 1 addition & 1 deletion third-party/fizz/src/fizz/server/AsyncFizzServer-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ template <typename SM>
void AsyncFizzServerT<SM>::ActionMoveVisitor::operator()(
SecretAvailable& secret) {
fizz_probe_secret_available(
secret.secret.secret.size(),
secret.secret.secret.data(),
secret.secret.secret.size(),
KeyLogWriter::secretToNSSLabel(secret.secret.type)
.value_or(std::numeric_limits<KeyLogWriter::Label>::max()),
server_.getClientRandom()->data());
Expand Down
4 changes: 2 additions & 2 deletions third-party/fizz/src/fizz/util/Tracing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
namespace fizz {
extern "C" {
void fizz_probe_secret_available(
long unsigned int secretSize,
unsigned char* secretData,
unsigned char secretSize,
fizz::KeyLogWriter::Label nssLabel,
unsigned char* clientRandom) {
FOLLY_SDT(
fizz,
fizz_secret_available,
secretSize,
secretData,
secretSize,
nssLabel,
clientRandom);
}
Expand Down
2 changes: 1 addition & 1 deletion third-party/fizz/src/fizz/util/Tracing.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace fizz {

extern "C" {
void fizz_probe_secret_available(
long unsigned int secretSize,
unsigned char* secretData,
unsigned char secretSize,
fizz::KeyLogWriter::Label nssLabel,
unsigned char* clientRandom);
}
Expand Down

0 comments on commit ee77520

Please sign in to comment.