• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2009 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 
5 #ifndef NET_BASE_CONNECTION_TYPE_HISTOGRAMS_H_
6 #define NET_BASE_CONNECTION_TYPE_HISTOGRAMS_H_
7 #pragma once
8 
9 // The UpdateConnectionTypeHistograms function collects statistics related
10 // to the number of MD5 certificates that our users are encountering.  The
11 // information will help us decide when it is fine for browsers to stop
12 // supporting MD5 certificates, in light of the recent MD5 certificate
13 // collision attack (see "MD5 considered harmful today: Creating a rogue CA
14 // certificate" at http://www.win.tue.nl/hashclash/rogue-ca/).
15 
16 namespace net {
17 
18 enum ConnectionType {
19   CONNECTION_ANY = 0,      // Any connection (SSL, HTTP, SPDY, etc)
20   CONNECTION_SSL = 1,      // An SSL connection
21   CONNECTION_SSL_MD5 = 2,  // An SSL connection with an MD5 certificate in
22                            // the certificate chain (excluding root)
23   CONNECTION_SSL_MD2 = 3,  // An SSL connection with an MD2 certificate in
24                            // the certificate chain (excluding root)
25   CONNECTION_SSL_MD4 = 4,  // An SSL connection with an MD4 certificate in
26                            // the certificate chain (excluding root)
27   CONNECTION_SSL_MD5_CA = 5,  // An SSL connection with an MD5 CA certificate
28                               // in the certificate chain (excluding root)
29   CONNECTION_SSL_MD2_CA = 6,  // An SSL connection with an MD2 CA certificate
30                               // in the certificate chain (excluding root)
31   CONNECTION_HTTP = 7,     // An HTTP connection
32   CONNECTION_SPDY = 8,     // A SPDY connection
33   CONNECTION_SSL_SSL2 = 9,     // An SSL connection that uses SSL 2.0
34   CONNECTION_SSL_SSL3 = 10,    // An SSL connection that uses SSL 3.0
35   CONNECTION_SSL_TLS1 = 11,    // An SSL connection that uses TLS 1.0
36   CONNECTION_SSL_TLS1_1 = 12,  // An SSL connection that uses TLS 1.1
37   CONNECTION_SSL_TLS1_2 = 13,  // An SSL connection that uses TLS 1.2
38   NUM_OF_CONNECTION_TYPES
39 };
40 
41 // Update the connection type histograms.  |type| is the connection type.
42 void UpdateConnectionTypeHistograms(ConnectionType type);
43 
44 }  // namespace net
45 
46 #endif  // NET_BASE_CONNECTION_TYPE_HISTOGRAMS_H_
47