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