Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Unified Diff: net/http/http_network_transaction.cc

Issue 2337253004: Update Token Binding code to the latest drafts (Closed)
Patch Set: Add call to CBS_len() Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_basic_stream.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 10b6e12fdb960535ad66c83782873a3ffa5f2f5c..d17ef213ab9ab01160211c8fe94c1d127e3c3c47 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -1022,8 +1022,9 @@ int HttpNetworkTransaction::BuildRequestHeaders(
int HttpNetworkTransaction::BuildTokenBindingHeader(std::string* out) {
base::TimeTicks start = base::TimeTicks::Now();
std::vector<uint8_t> signed_ekm;
- int rv = stream_->GetSignedEKMForTokenBinding(
- provided_token_binding_key_.get(), &signed_ekm);
+ int rv = stream_->GetTokenBindingSignature(provided_token_binding_key_.get(),
+ TokenBindingType::PROVIDED,
+ &signed_ekm);
if (rv != OK)
return rv;
std::string provided_token_binding;
@@ -1039,8 +1040,9 @@ int HttpNetworkTransaction::BuildTokenBindingHeader(std::string* out) {
std::string referred_token_binding;
if (referred_token_binding_key_) {
std::vector<uint8_t> referred_signed_ekm;
- int rv = stream_->GetSignedEKMForTokenBinding(
- referred_token_binding_key_.get(), &referred_signed_ekm);
+ int rv = stream_->GetTokenBindingSignature(
+ referred_token_binding_key_.get(), TokenBindingType::REFERRED,
+ &referred_signed_ekm);
if (rv != OK)
return rv;
rv = BuildTokenBinding(TokenBindingType::REFERRED,
@@ -1054,8 +1056,7 @@ int HttpNetworkTransaction::BuildTokenBindingHeader(std::string* out) {
rv = BuildTokenBindingMessageFromTokenBindings(token_bindings, &header);
if (rv != OK)
return rv;
- base::Base64UrlEncode(header, base::Base64UrlEncodePolicy::INCLUDE_PADDING,
- out);
+ base::Base64UrlEncode(header, base::Base64UrlEncodePolicy::OMIT_PADDING, out);
base::TimeDelta header_creation_time = base::TimeTicks::Now() - start;
UMA_HISTOGRAM_CUSTOM_TIMES("Net.TokenBinding.HeaderCreationTime",
header_creation_time,
« no previous file with comments | « net/http/http_basic_stream.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698