Index: net/quic/chromium/quic_chromium_client_session.cc |
diff --git a/net/quic/chromium/quic_chromium_client_session.cc b/net/quic/chromium/quic_chromium_client_session.cc |
index f7a1c65131abda4e1533975f1128977aa73dedc2..3f5af02714aa799a03008c91b31d4483196d6352 100644 |
--- a/net/quic/chromium/quic_chromium_client_session.cc |
+++ b/net/quic/chromium/quic_chromium_client_session.cc |
@@ -593,7 +593,7 @@ bool QuicChromiumClientSession::GetSSLInfo(SSLInfo* ssl_info) const { |
ssl_info->UpdateCertificateTransparencyInfo(*ct_verify_result_); |
if (crypto_stream_->crypto_negotiated_params().token_binding_key_param == |
- kP256) { |
+ kTB10) { |
ssl_info->token_binding_negotiated = true; |
ssl_info->token_binding_key_param = TB_PARAM_ECDSAP256; |
} |
@@ -603,6 +603,7 @@ bool QuicChromiumClientSession::GetSSLInfo(SSLInfo* ssl_info) const { |
Error QuicChromiumClientSession::GetTokenBindingSignature( |
crypto::ECPrivateKey* key, |
+ TokenBindingType tb_type, |
std::vector<uint8_t>* out) { |
// The same key will be used across multiple requests to sign the same value, |
// so the signature is cached. |
@@ -610,7 +611,7 @@ Error QuicChromiumClientSession::GetTokenBindingSignature( |
if (!key->ExportRawPublicKey(&raw_public_key)) |
return ERR_FAILED; |
TokenBindingSignatureMap::iterator it = |
- token_binding_signatures_.Get(raw_public_key); |
+ token_binding_signatures_.Get(std::make_pair(tb_type, raw_public_key)); |
if (it != token_binding_signatures_.end()) { |
*out = it->second; |
return OK; |
@@ -619,9 +620,9 @@ Error QuicChromiumClientSession::GetTokenBindingSignature( |
std::string key_material; |
if (!crypto_stream_->ExportTokenBindingKeyingMaterial(&key_material)) |
return ERR_FAILED; |
- if (!SignTokenBindingEkm(key_material, key, out)) |
+ if (!CreateTokenBindingSignature(key_material, tb_type, key, out)) |
return ERR_FAILED; |
- token_binding_signatures_.Put(raw_public_key, *out); |
+ token_binding_signatures_.Put(std::make_pair(tb_type, raw_public_key), *out); |
return OK; |
} |