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

Side by Side Diff: content/browser/renderer_host/pepper/ssl_context_helper.cc

Issue 2067843003: Require a CTVerifier and CTPolicyEnforcer for TLS/QUIC sockets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixup 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/pepper/ssl_context_helper.h" 5 #include "content/browser/renderer_host/pepper/ssl_context_helper.h"
6 6
7 #include "net/cert/cert_verifier.h" 7 #include "net/cert/cert_verifier.h"
8 #include "net/cert/ct_policy_enforcer.h"
9 #include "net/cert/multi_log_ct_verifier.h"
8 #include "net/http/transport_security_state.h" 10 #include "net/http/transport_security_state.h"
9 11
10 namespace content { 12 namespace content {
11 13
12 SSLContextHelper::SSLContextHelper() {} 14 SSLContextHelper::SSLContextHelper() {}
13 15
14 SSLContextHelper::~SSLContextHelper() {} 16 SSLContextHelper::~SSLContextHelper() {}
15 17
16 net::CertVerifier* SSLContextHelper::GetCertVerifier() { 18 net::CertVerifier* SSLContextHelper::GetCertVerifier() {
17 if (!cert_verifier_) 19 if (!cert_verifier_)
18 cert_verifier_ = net::CertVerifier::CreateDefault(); 20 cert_verifier_ = net::CertVerifier::CreateDefault();
19 return cert_verifier_.get(); 21 return cert_verifier_.get();
20 } 22 }
21 23
22 net::TransportSecurityState* SSLContextHelper::GetTransportSecurityState() { 24 net::TransportSecurityState* SSLContextHelper::GetTransportSecurityState() {
23 if (!transport_security_state_) 25 if (!transport_security_state_)
24 transport_security_state_.reset(new net::TransportSecurityState()); 26 transport_security_state_.reset(new net::TransportSecurityState());
25 return transport_security_state_.get(); 27 return transport_security_state_.get();
26 } 28 }
27 29
30 net::CTVerifier* SSLContextHelper::GetCertTransparencyVerifier() {
31 if (!cert_transparency_verifier_)
32 cert_transparency_verifier_.reset(new net::MultiLogCTVerifier());
33 return cert_transparency_verifier_.get();
34 }
35
36 net::CTPolicyEnforcer* SSLContextHelper::GetCTPolicyEnforcer() {
37 if (!ct_policy_enforcer_)
38 ct_policy_enforcer_.reset(new net::CTPolicyEnforcer());
39 return ct_policy_enforcer_.get();
40 }
41
28 } // namespace content 42 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/pepper/ssl_context_helper.h ('k') | content/shell/browser/shell_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698