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

Unified Diff: net/socket/ssl_client_socket_openssl.h

Issue 1378613004: Set Token-Binding HTTP header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tb-tls-ext-new
Patch Set: Add UMA logging of Token Binding support and NetLog event for Token Binding key lookup Created 5 years, 1 month 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 9acb728f961b498a06236f0f2af1c8f9fba127af..2d8ebe165f979467c7f4f64d8d81e49e696877e8 100644
--- a/net/socket/ssl_client_socket_openssl.h
+++ b/net/socket/ssl_client_socket_openssl.h
@@ -13,6 +13,7 @@
#include <vector>
#include "base/compiler_specific.h"
+#include "base/containers/mru_cache.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "net/base/completion_callback.h"
@@ -36,6 +37,8 @@ class SSLCertRequestInfo;
class SSLInfo;
class SSLPrivateKey;
+typedef base::MRUCache<std::string, std::vector<uint8_t>> SignedEkmMap;
+
// An SSL client socket implemented with OpenSSL.
class SSLClientSocketOpenSSL : public SSLClientSocket {
public:
@@ -61,6 +64,8 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
NextProtoStatus GetNextProto(std::string* proto) const override;
ChannelIDService* GetChannelIDService() const override;
+ int GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key,
+ std::vector<uint8_t>* out) override;
SSLFailureState GetSSLFailureState() const override;
// SSLSocket implementation.
@@ -290,6 +295,7 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
ChannelIDService* channel_id_service_;
bool tb_was_negotiated_;
TokenBindingParam tb_negotiated_param_;
+ SignedEkmMap tb_signed_ekm_map_;
// OpenSSL stuff
SSL* ssl_;

Powered by Google App Engine
This is Rietveld 408576698