OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_BASE_SSL_INFO_H_ | 5 #ifndef NET_BASE_SSL_INFO_H_ |
6 #define NET_BASE_SSL_INFO_H_ | 6 #define NET_BASE_SSL_INFO_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "net/base/cert_status_flags.h" |
12 #include "net/base/net_export.h" | 13 #include "net/base/net_export.h" |
13 #include "net/base/x509_cert_types.h" | 14 #include "net/base/x509_cert_types.h" |
14 | 15 |
15 namespace net { | 16 namespace net { |
16 | 17 |
17 class X509Certificate; | 18 class X509Certificate; |
18 | 19 |
19 // SSL connection info. | 20 // SSL connection info. |
20 // This is really a struct. All members are public. | 21 // This is really a struct. All members are public. |
21 class NET_EXPORT SSLInfo { | 22 class NET_EXPORT SSLInfo { |
(...skipping 17 matching lines...) Expand all Loading... |
39 | 40 |
40 // Adds the specified |error| to the cert status. | 41 // Adds the specified |error| to the cert status. |
41 void SetCertError(int error); | 42 void SetCertError(int error); |
42 | 43 |
43 // The SSL certificate. | 44 // The SSL certificate. |
44 scoped_refptr<X509Certificate> cert; | 45 scoped_refptr<X509Certificate> cert; |
45 | 46 |
46 // Bitmask of status info of |cert|, representing, for example, known errors | 47 // Bitmask of status info of |cert|, representing, for example, known errors |
47 // and extended validation (EV) status. | 48 // and extended validation (EV) status. |
48 // See cert_status_flags.h for values. | 49 // See cert_status_flags.h for values. |
49 int cert_status; | 50 CertStatus cert_status; |
50 | 51 |
51 // The security strength, in bits, of the SSL cipher suite. | 52 // The security strength, in bits, of the SSL cipher suite. |
52 // 0 means the connection is not encrypted. | 53 // 0 means the connection is not encrypted. |
53 // -1 means the security strength is unknown. | 54 // -1 means the security strength is unknown. |
54 int security_bits; | 55 int security_bits; |
55 | 56 |
56 // Information about the SSL connection itself. See | 57 // Information about the SSL connection itself. See |
57 // ssl_connection_status_flags.h for values. The protocol version, | 58 // ssl_connection_status_flags.h for values. The protocol version, |
58 // ciphersuite, and compression in use are encoded within. | 59 // ciphersuite, and compression in use are encoded within. |
59 int connection_status; | 60 int connection_status; |
60 | 61 |
61 // If the certificate is valid, then this is true iff it was rooted at a | 62 // If the certificate is valid, then this is true iff it was rooted at a |
62 // standard CA root. (As opposed to a user-installed root.) | 63 // standard CA root. (As opposed to a user-installed root.) |
63 bool is_issued_by_known_root; | 64 bool is_issued_by_known_root; |
64 | 65 |
65 HandshakeType handshake_type; | 66 HandshakeType handshake_type; |
66 | 67 |
67 // The hashes of the SubjectPublicKeyInfos from each certificate in the chain. | 68 // The hashes of the SubjectPublicKeyInfos from each certificate in the chain. |
68 std::vector<SHA1Fingerprint> public_key_hashes; | 69 std::vector<SHA1Fingerprint> public_key_hashes; |
69 }; | 70 }; |
70 | 71 |
71 } // namespace net | 72 } // namespace net |
72 | 73 |
73 #endif // NET_BASE_SSL_INFO_H_ | 74 #endif // NET_BASE_SSL_INFO_H_ |
OLD | NEW |