summaryrefslogtreecommitdiffstats
path: root/net/socket/ssl_client_socket_openssl.h
diff options
context:
space:
mode:
authornharper <nharper@chromium.org>2016-01-25 15:54:14 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-25 23:55:18 +0000
commitb7441ef2effe86324798710a82d8a006f5eb1395 (patch)
treebbc0a66b978a7d10640509cc3eb91dc3e8662303 /net/socket/ssl_client_socket_openssl.h
parent65295cfea49ef91053171841767163db073df1da (diff)
downloadchromium_src-b7441ef2effe86324798710a82d8a006f5eb1395.zip
chromium_src-b7441ef2effe86324798710a82d8a006f5eb1395.tar.gz
chromium_src-b7441ef2effe86324798710a82d8a006f5eb1395.tar.bz2
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}
Diffstat (limited to 'net/socket/ssl_client_socket_openssl.h')
-rw-r--r--net/socket/ssl_client_socket_openssl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/socket/ssl_client_socket_openssl.h b/net/socket/ssl_client_socket_openssl.h
index 178daeb..6e464d7 100644
--- a/net/socket/ssl_client_socket_openssl.h
+++ b/net/socket/ssl_client_socket_openssl.h
@@ -13,6 +13,8 @@
#include <string>
#include <vector>
+#include "base/compiler_specific.h"
+#include "base/containers/mru_cache.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
@@ -42,6 +44,8 @@ class CTVerifier;
class SSLCertRequestInfo;
class SSLInfo;
+using SignedEkmMap = base::MRUCache<std::string, std::vector<uint8_t>>;
+
// An SSL client socket implemented with OpenSSL.
class SSLClientSocketOpenSSL : public SSLClientSocket {
public:
@@ -72,6 +76,8 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
NextProtoStatus GetNextProto(std::string* proto) const override;
ChannelIDService* GetChannelIDService() const override;
+ Error GetSignedEKMForTokenBinding(crypto::ECPrivateKey* key,
+ std::vector<uint8_t>* out) override;
SSLFailureState GetSSLFailureState() const override;
// SSLSocket implementation.
@@ -301,6 +307,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_;