File: ssl_legacy_crypto_fallback.h

package info (click to toggle)
chromium 120.0.6099.224-1~deb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 6,112,112 kB
  • sloc: cpp: 32,907,025; ansic: 8,148,123; javascript: 3,679,536; python: 2,031,248; asm: 959,718; java: 804,675; xml: 617,256; sh: 111,417; objc: 100,835; perl: 88,443; cs: 53,032; makefile: 29,579; fortran: 24,137; php: 21,162; tcl: 21,147; sql: 20,809; ruby: 17,735; pascal: 12,864; yacc: 8,045; lisp: 3,388; lex: 1,323; ada: 727; awk: 329; jsp: 267; csh: 117; exp: 43; sed: 37
file content (42 lines) | stat: -rw-r--r-- 1,633 bytes parent folder | download | duplicates (2)
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 2020 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_SSL_SSL_LEGACY_CRYPTO_FALLBACK_H_
#define NET_SSL_SSL_LEGACY_CRYPTO_FALLBACK_H_

namespace net {

// Classifies reasons why a connection might require the legacy crypto fallback.
// Note that, although SHA-1 certificates are no longer accepted, servers may
// still send unused certificates. Some such servers additionally match their
// certificate chains against the ClientHello. These servers require the client
// advertise legacy algorithms despite not actually using them.
//
// These values are logged to UMA. Entries should not be renumbered and
// numeric values should never be reused. Please keep in sync with
// "SSLLegacyCryptoFallback" in src/tools/metrics/histograms/enums.xml.
enum class SSLLegacyCryptoFallback {
  // The connection did not use the fallback.
  kNoFallback = 0,
  // No longer used.
  //   kUsed3DES = 1,
  // The connection used the fallback and negotiated SHA-1.
  kUsedSHA1 = 2,
  // The connection used the fallback and sent a certificate signed with
  // RSASSA-PKCS1-v1_5-SHA-1.
  kSentSHA1Cert = 3,
  // No longer used.
  //   kSentSHA1CertAndUsed3DES = 4,
  // The connection used the fallback, negotiated SHA-1, and sent a certificate
  // signed with RSASSA-PKCS1-v1_5-SHA-1.
  kSentSHA1CertAndUsedSHA1 = 5,
  // The connection used the fallback for an unknown reason, likely a
  // transient network error.
  kUnknownReason = 6,
  kMaxValue = kUnknownReason,
};

}  // namespace net

#endif  // NET_SSL_SSL_LEGACY_CRYPTO_FALLBACK_H_