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

Unified Diff: net/socket/ssl_client_socket_openssl.h

Issue 1360633002: Implement Token Binding negotiation TLS extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test-server-flags
Patch Set: update to latest version of tb nego spec; tweak SSLConfig Created 5 years, 2 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/ssl_client_socket_openssl.h
diff --git a/net/socket/ssl_client_socket_openssl.h b/net/socket/ssl_client_socket_openssl.h
index dbceeafa3fc5dbe0dc4f9ae8c4f348dfacd09220..e411b68126e0c645f1f114be05870111c875d121 100644
--- a/net/socket/ssl_client_socket_openssl.h
+++ b/net/socket/ssl_client_socket_openssl.h
@@ -210,6 +210,35 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
void OnPrivateKeySignComplete(Error error,
const std::vector<uint8_t>& signature);
+ // Token Binding Extension callbacks. RegisterTokenBindingExtensionCallbacks
+ // sets the following static methods as the callbacks for the boringssl custom
+ // extension API. The Add and Parse callbacks are wrappers around the instance
+ // methods; The Free callback is a wrapper around OPENSSL_free.
davidben 2015/11/04 00:40:36 "; The" -> "; the" Though I'd probably just drop
nharper 2015/11/04 02:28:04 Done.
+ static bool RegisterTokenBindingExtensionCallbacks(SSL_CTX* ssl_ctx);
+ static int TokenBindingAddCallback(SSL* ssl,
+ unsigned int extension_value,
+ const uint8_t** out,
+ size_t* out_len,
+ int* out_alert_value,
+ void* add_arg);
+ static void TokenBindingFreeCallback(SSL* ssl,
+ unsigned int extension_value,
+ const uint8_t* out,
+ void* add_arg);
+ static int TokenBindingParseCallback(SSL* ssl,
+ unsigned int extension_value,
+ const uint8_t* contents,
+ size_t contents_len,
+ int* out_alert_value,
+ void* parse_arg);
+
+ int TokenBindingAdd(const uint8_t** out,
+ size_t* out_len,
+ int* out_alert_value);
+ int TokenBindingParse(const uint8_t* contents,
+ size_t contents_len,
+ int* out_alert_value);
+
bool transport_send_busy_;
bool transport_recv_busy_;
@@ -281,6 +310,8 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
// The service for retrieving Channel ID keys. May be NULL.
ChannelIDService* channel_id_service_;
+ bool tb_was_negotiated_;
+ TokenBindingParam tb_negotiated_param_;
// OpenSSL stuff
SSL* ssl_;

Powered by Google App Engine
This is Rietveld 408576698