File: ct_policy_status.h

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (54 lines) | stat: -rw-r--r-- 2,070 bytes parent folder | download | duplicates (5)
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
43
44
45
46
47
48
49
50
51
52
53
54
// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef NET_CERT_CT_POLICY_STATUS_H_
#define NET_CERT_CT_POLICY_STATUS_H_

#include "net/base/net_export.h"

namespace net::ct {

// Information about the connection's compliance with the CT policy. This value
// is histogrammed, so do not re-order or change values, and add new values at
// the end.
// LINT.IfChange(CTPolicyCompliance)
enum class CTPolicyCompliance {
  // The connection complied with the certificate policy by
  // including SCTs that satisfy the policy.
  CT_POLICY_COMPLIES_VIA_SCTS = 0,
  // The connection did not have enough SCTs to comply.
  CT_POLICY_NOT_ENOUGH_SCTS = 1,
  // The connection did not have diverse enough SCTs to comply.
  CT_POLICY_NOT_DIVERSE_SCTS = 2,
  // The connection cannot be considered compliant because the build
  // isn't timely and therefore log information might be out of date
  // (for example a log might no longer be considered trustworthy).
  CT_POLICY_BUILD_NOT_TIMELY = 3,
  // Compliance details for the connection are not available, e.g. because a
  // resource was loaded from disk cache.
  CT_POLICY_COMPLIANCE_DETAILS_NOT_AVAILABLE = 4,
  // TODO(crbug.com/41392053): remove CT_POLICY_COUNT, use kMaxValue instead.
  CT_POLICY_COUNT
};
// LINT.ThenChange(/services/network/public/cpp/net_ipc_param_traits.h:CTPolicyCompliance)

NET_EXPORT const char* CTPolicyComplianceToString(CTPolicyCompliance status);

// Indicates whether a path met CT requirements.
enum class CTRequirementsStatus {
  // CT was not required for the path.
  CT_NOT_REQUIRED,
  // CT was required for the path and valid Certificate Transparency
  // information was provided.
  CT_REQUIREMENTS_MET,
  // CT was required for the path but valid CT info was not provided.
  CT_REQUIREMENTS_NOT_MET,
  kMaxValue = CT_REQUIREMENTS_NOT_MET
};

NET_EXPORT const char* CTRequirementStatusToString(CTRequirementsStatus status);

}  // namespace net::ct

#endif  // NET_CERT_CT_POLICY_STATUS_H_