summaryrefslogtreecommitdiffstats
path: root/net/cert/cert_trust_anchor_provider.h
blob: 1712b2d02115a68ebb61689203ad4e20b5736da1 (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
// Copyright (c) 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.

#ifndef NET_CERT_CERT_TRUST_ANCHOR_PROVIDER_H_
#define NET_CERT_CERT_TRUST_ANCHOR_PROVIDER_H_

#include <vector>

#include "base/memory/ref_counted.h"
#include "net/base/net_export.h"

namespace net {

class X509Certificate;
typedef std::vector<scoped_refptr<X509Certificate> > CertificateList;

// Interface to retrieve the current list of additional trust anchors.
// This is used by CertVerifier to get a list of anchors to trust in addition to
// the anchors known to the CertVerifier.
class NET_EXPORT CertTrustAnchorProvider {
 public:
  virtual ~CertTrustAnchorProvider() {}

  // Returns a list of certificates to be used as trust anchors during
  // certificate validation, in addition to (eg: the union of) any pre-existing
  // or pre-configured trust anchors.
  virtual const CertificateList& GetAdditionalTrustAnchors() = 0;
};

}  // namespace net

#endif  // NET_CERT_CERT_TRUST_ANCHOR_PROVIDER_H_