summaryrefslogtreecommitdiff
path: root/chromium/content/browser/renderer_host/pepper/ssl_context_helper.cc
blob: 1d6fb4c962112e9315a1f0f8fcacd366eda20776 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/browser/renderer_host/pepper/ssl_context_helper.h"

#include "net/cert/cert_verifier.h"
#include "net/cert/ct_policy_enforcer.h"
#include "net/cert/multi_log_ct_verifier.h"
#include "net/http/transport_security_state.h"

namespace content {

SSLContextHelper::SSLContextHelper() {}

SSLContextHelper::~SSLContextHelper() {}

net::CertVerifier* SSLContextHelper::GetCertVerifier() {
  if (!cert_verifier_)
    cert_verifier_ = net::CertVerifier::CreateDefault();
  return cert_verifier_.get();
}

net::TransportSecurityState* SSLContextHelper::GetTransportSecurityState() {
  if (!transport_security_state_)
    transport_security_state_.reset(new net::TransportSecurityState());
  return transport_security_state_.get();
}

net::CTVerifier* SSLContextHelper::GetCertTransparencyVerifier() {
  if (!cert_transparency_verifier_)
    cert_transparency_verifier_.reset(new net::MultiLogCTVerifier());
  return cert_transparency_verifier_.get();
}

net::CTPolicyEnforcer* SSLContextHelper::GetCTPolicyEnforcer() {
  if (!ct_policy_enforcer_)
    ct_policy_enforcer_.reset(new net::DefaultCTPolicyEnforcer());
  return ct_policy_enforcer_.get();
}

}  // namespace content