Set Token-Binding HTTP header
Adds a new method to SSLClientSocket to get the Token Binding from an SSL
connection where Token Binding was negotiated, and uses that to add the
Set-Token-Binding HTTP header (only when Token Binding was negotiated).
BUG=467312
Review URL: https://codereview.chromium.org/1378613004
Cr-Commit-Position: refs/heads/master@{#371347}
diff --git a/net/http/http_basic_stream.cc b/net/http/http_basic_stream.cc
index 260ad55f2..6b08d13e 100644
--- a/net/http/http_basic_stream.cc
+++ b/net/http/http_basic_stream.cc
@@ -111,6 +111,11 @@
return state_.connection()->socket()->GetPeerAddress(endpoint) == OK;
}
+Error HttpBasicStream::GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key,
+ std::vector<uint8_t>* out) {
+ return parser()->GetSignedEKMForTokenBinding(key, out);
+}
+
void HttpBasicStream::Drain(HttpNetworkSession* session) {
HttpResponseBodyDrainer* drainer = new HttpResponseBodyDrainer(this);
drainer->Start(session);