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

Unified Diff: net/socket/socket_test_util.cc

Issue 1378613004: Set Token-Binding HTTP header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tb-tls-ext-new
Patch Set: Remove sequence numbers from mock reads Created 4 years, 11 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
Index: net/socket/socket_test_util.cc
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc
index 04f5151d4fe7f0293ff62908e1036dc5057d437d..095ebe83729fca22493ba3d46bb42e2692cddbc8 100644
--- a/net/socket/socket_test_util.cc
+++ b/net/socket/socket_test_util.cc
@@ -287,7 +287,8 @@ SSLSocketDataProvider::SSLSocketDataProvider(IoMode mode, int result)
client_cert_sent(false),
cert_request_info(NULL),
channel_id_sent(false),
- connection_status(0) {
+ connection_status(0),
+ token_binding_negotiated(false) {
SSLConnectionStatusSetVersion(SSL_CONNECTION_VERSION_TLS1_2,
&connection_status);
// Set to TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
@@ -826,6 +827,12 @@ ChannelIDService* MockClientSocket::GetChannelIDService() const {
return NULL;
}
+Error MockClientSocket::GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key,
+ std::vector<uint8_t>* out) {
+ NOTREACHED();
+ return ERR_NOT_IMPLEMENTED;
+}
+
SSLFailureState MockClientSocket::GetSSLFailureState() const {
return IsConnected() ? SSL_FAILURE_NONE : SSL_FAILURE_UNKNOWN;
}
@@ -1199,6 +1206,8 @@ bool MockSSLClientSocket::GetSSLInfo(SSLInfo* ssl_info) {
ssl_info->client_cert_sent = data_->client_cert_sent;
ssl_info->channel_id_sent = data_->channel_id_sent;
ssl_info->connection_status = data_->connection_status;
+ ssl_info->token_binding_negotiated = data_->token_binding_negotiated;
+ ssl_info->token_binding_key_param = data_->token_binding_key_param;
return true;
}
@@ -1224,6 +1233,13 @@ ChannelIDService* MockSSLClientSocket::GetChannelIDService() const {
return data_->channel_id_service;
}
+Error MockSSLClientSocket::GetSignedEKMForTokenBinding(
+ crypto::ECPrivateKey* key,
+ std::vector<uint8_t>* out) {
+ out->push_back('A');
+ return OK;
+}
+
void MockSSLClientSocket::OnReadComplete(const MockRead& data) {
NOTIMPLEMENTED();
}

Powered by Google App Engine
This is Rietveld 408576698