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

Unified Diff: extensions/browser/api/cast_channel/cast_socket.cc

Issue 2082213002: Add CTVerifier and CTPolicyEnforcer to cast channel ssl socket (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-re-comment Created 4 years, 6 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
« no previous file with comments | « extensions/browser/api/cast_channel/cast_socket.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/cast_channel/cast_socket.cc
diff --git a/extensions/browser/api/cast_channel/cast_socket.cc b/extensions/browser/api/cast_channel/cast_socket.cc
index a1f458a7860c171b99150fc760e04452d5d1b821..993ebff530644d1f6927cbbadf771cf597990d1a 100644
--- a/extensions/browser/api/cast_channel/cast_socket.cc
+++ b/extensions/browser/api/cast_channel/cast_socket.cc
@@ -34,6 +34,8 @@
#include "net/base/net_errors.h"
#include "net/cert/cert_verifier.h"
#include "net/cert/cert_verify_result.h"
+#include "net/cert/ct_policy_enforcer.h"
+#include "net/cert/multi_log_ct_verifier.h"
#include "net/cert/x509_certificate.h"
#include "net/http/transport_security_state.h"
#include "net/socket/client_socket_factory.h"
@@ -186,11 +188,15 @@ std::unique_ptr<net::SSLClientSocket> CastSocketImpl::CreateSslSocket(
net::SSLConfig ssl_config;
cert_verifier_ = base::WrapUnique(new FakeCertVerifier);
transport_security_state_.reset(new net::TransportSecurityState);
+ cert_transparency_verifier_.reset(new net::MultiLogCTVerifier());
+ ct_policy_enforcer_.reset(new net::CTPolicyEnforcer());
+
+ // Note that |context| fields remain owned by CastSocketImpl.
net::SSLClientSocketContext context;
- // CertVerifier and TransportSecurityState are owned by us, not the
- // context object.
context.cert_verifier = cert_verifier_.get();
context.transport_security_state = transport_security_state_.get();
+ context.cert_transparency_verifier = cert_transparency_verifier_.get();
+ context.ct_policy_enforcer = ct_policy_enforcer_.get();
std::unique_ptr<net::ClientSocketHandle> connection(
new net::ClientSocketHandle);
« no previous file with comments | « extensions/browser/api/cast_channel/cast_socket.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698