Chromium Code Reviews| OLD | NEW |
|---|---|
| 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()); | |
|
Eran Messeri
2016/06/20 09:32:02
I'll note that AddLogs with the known logs is neve
Ryan Sleevi
2016/06/20 16:27:27
Yes. This is all intentional. There are a number o
| |
| 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 |
| OLD | NEW |