Commit 1d0bc611 authored by David Van Cleve's avatar David Van Cleve Committed by Chromium LUCI CQ

Trust Tokens: Add an explicit kStringType to a string-type Structured Headers field entry

The structured_headers::Item constructor has a default argument that determines whether a given Item will serialize as a "byte sequence" or a "string" Structured Headers item. Elsewhere in trust_token_request_signing_helper.cc, we try explicitly to provide kStringType or kByteSequenceType to the constructor to make it clear at the callsite which of the two types each particular item has. This change is a no-op adding kStringType at a callsite to make it apparent to readers that the Item in question is string-type.

Bug: None
Change-Id: Id7a12f4d57ed6ecdb3ab48b3ca5468cf3b7459dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2638563
Commit-Queue: David Van Cleve <davidvc@chromium.org>
Auto-Submit: David Van Cleve <davidvc@chromium.org>
Reviewed-by: default avatarCharlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845551}
parent 29b23b41
......@@ -521,7 +521,10 @@ base::Optional<std::string> TrustTokenRequestSigningHelper::
header_items[kSignatureHeaderAlgorithmKey] =
net::structured_headers::ParameterizedMember(
net::structured_headers::Item(signer_->GetAlgorithmIdentifier()), {});
net::structured_headers::Item(
signer_->GetAlgorithmIdentifier(),
net::structured_headers::Item::ItemType::kStringType),
{});
std::vector<net::structured_headers::ParameterizedItem> keys_and_signatures;
for (const auto& kv : signatures_per_issuer) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment