ssl_legacy_crypto_fallback.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef NET_SSL_SSL_LEGACY_CRYPTO_FALLBACK_H_
  5. #define NET_SSL_SSL_LEGACY_CRYPTO_FALLBACK_H_
  6. namespace net {
  7. // Classifies reasons why a connection might require the legacy crypto fallback.
  8. // Note that, although SHA-1 certificates are no longer accepted, servers may
  9. // still send unused certificates. Some such servers additionally match their
  10. // certificate chains against the ClientHello. These servers require the client
  11. // advertise legacy algorithms despite not actually using them.
  12. //
  13. // These values are logged to UMA. Entries should not be renumbered and
  14. // numeric values should never be reused. Please keep in sync with
  15. // "SSLLegacyCryptoFallback" in src/tools/metrics/histograms/enums.xml.
  16. enum class SSLLegacyCryptoFallback {
  17. // The connection did not use the fallback.
  18. kNoFallback = 0,
  19. // No longer used.
  20. // kUsed3DES = 1,
  21. // The connection used the fallback and negotiated SHA-1.
  22. kUsedSHA1 = 2,
  23. // The connection used the fallback and sent a certificate signed with
  24. // RSASSA-PKCS1-v1_5-SHA-1.
  25. kSentSHA1Cert = 3,
  26. // No longer used.
  27. // kSentSHA1CertAndUsed3DES = 4,
  28. // The connection used the fallback, negotiated SHA-1, and sent a certificate
  29. // signed with RSASSA-PKCS1-v1_5-SHA-1.
  30. kSentSHA1CertAndUsedSHA1 = 5,
  31. // The connection used the fallback for an unknown reason, likely a
  32. // transient network error.
  33. kUnknownReason = 6,
  34. kMaxValue = kUnknownReason,
  35. };
  36. } // namespace net
  37. #endif // NET_SSL_SSL_LEGACY_CRYPTO_FALLBACK_H_