| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SSL_SSL_INFO_H_ | 5 #ifndef NET_SSL_SSL_INFO_H_ |
| 6 #define NET_SSL_SSL_INFO_H_ | 6 #define NET_SSL_SSL_INFO_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <vector> | 10 #include <vector> |
| 9 | 11 |
| 10 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 11 #include "net/base/net_export.h" | 13 #include "net/base/net_export.h" |
| 12 #include "net/cert/cert_status_flags.h" | 14 #include "net/cert/cert_status_flags.h" |
| 13 #include "net/cert/ct_verify_result.h" | 15 #include "net/cert/ct_verify_result.h" |
| 14 #include "net/cert/ocsp_verify_result.h" | 16 #include "net/cert/ocsp_verify_result.h" |
| 15 #include "net/cert/sct_status_flags.h" | 17 #include "net/cert/sct_status_flags.h" |
| 16 #include "net/cert/signed_certificate_timestamp_and_status.h" | 18 #include "net/cert/signed_certificate_timestamp_and_status.h" |
| 17 #include "net/cert/x509_cert_types.h" | 19 #include "net/cert/x509_cert_types.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 42 | 44 |
| 43 SSLInfo(); | 45 SSLInfo(); |
| 44 SSLInfo(const SSLInfo& info); | 46 SSLInfo(const SSLInfo& info); |
| 45 ~SSLInfo(); | 47 ~SSLInfo(); |
| 46 SSLInfo& operator=(const SSLInfo& info); | 48 SSLInfo& operator=(const SSLInfo& info); |
| 47 | 49 |
| 48 void Reset(); | 50 void Reset(); |
| 49 | 51 |
| 50 bool is_valid() const { return cert.get() != NULL; } | 52 bool is_valid() const { return cert.get() != NULL; } |
| 51 | 53 |
| 54 // Returns the ID of the (EC)DH group used by the key exchange or zero if |
| 55 // unknown (older cache entries may not store the value) or not applicable. |
| 56 uint16_t GetKeyExchangeGroup() const; |
| 57 |
| 52 // Adds the specified |error| to the cert status. | 58 // Adds the specified |error| to the cert status. |
| 53 void SetCertError(int error); | 59 void SetCertError(int error); |
| 54 | 60 |
| 55 // Adds the SignedCertificateTimestamps and policy compliance details | 61 // Adds the SignedCertificateTimestamps and policy compliance details |
| 56 // from ct_verify_result to |signed_certificate_timestamps| and | 62 // from ct_verify_result to |signed_certificate_timestamps| and |
| 57 // |ct_policy_compliance_details|. SCTs are held in three separate | 63 // |ct_policy_compliance_details|. SCTs are held in three separate |
| 58 // vectors in ct_verify_result, each vetor representing a particular | 64 // vectors in ct_verify_result, each vetor representing a particular |
| 59 // verification state, this method associates each of the SCTs with | 65 // verification state, this method associates each of the SCTs with |
| 60 // the corresponding SCTVerifyStatus as it adds it to the | 66 // the corresponding SCTVerifyStatus as it adds it to the |
| 61 // |signed_certificate_timestamps| list. | 67 // |signed_certificate_timestamps| list. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 77 | 83 |
| 78 // The security strength, in bits, of the SSL cipher suite. | 84 // The security strength, in bits, of the SSL cipher suite. |
| 79 // 0 means the connection is not encrypted. | 85 // 0 means the connection is not encrypted. |
| 80 // -1 means the security strength is unknown. | 86 // -1 means the security strength is unknown. |
| 81 int security_bits; | 87 int security_bits; |
| 82 | 88 |
| 83 // Security information of the SSL connection handshake. | 89 // Security information of the SSL connection handshake. |
| 84 // The meaning depends on the cipher used, see BoringSSL's |SSL_SESSION|'s | 90 // The meaning depends on the cipher used, see BoringSSL's |SSL_SESSION|'s |
| 85 // key_exchange_info for more information. | 91 // key_exchange_info for more information. |
| 86 // A zero indicates that the value is unknown. | 92 // A zero indicates that the value is unknown. |
| 93 // |
| 94 // This field is deprecated. Use GetKeyExchangeGroup instead. See |
| 95 // https://crbug.com/639421. |
| 87 int key_exchange_info; | 96 int key_exchange_info; |
| 88 | 97 |
| 89 // Information about the SSL connection itself. See | 98 // Information about the SSL connection itself. See |
| 90 // ssl_connection_status_flags.h for values. The protocol version, | 99 // ssl_connection_status_flags.h for values. The protocol version, |
| 91 // ciphersuite, and compression in use are encoded within. | 100 // ciphersuite, and compression in use are encoded within. |
| 92 int connection_status; | 101 int connection_status; |
| 93 | 102 |
| 94 // If the certificate is valid, then this is true iff it was rooted at a | 103 // If the certificate is valid, then this is true iff it was rooted at a |
| 95 // standard CA root. (As opposed to a user-installed root.) | 104 // standard CA root. (As opposed to a user-installed root.) |
| 96 bool is_issued_by_known_root; | 105 bool is_issued_by_known_root; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // is true. | 155 // is true. |
| 147 ct::CertPolicyCompliance ct_cert_policy_compliance; | 156 ct::CertPolicyCompliance ct_cert_policy_compliance; |
| 148 | 157 |
| 149 // OCSP stapling details. | 158 // OCSP stapling details. |
| 150 OCSPVerifyResult ocsp_result; | 159 OCSPVerifyResult ocsp_result; |
| 151 }; | 160 }; |
| 152 | 161 |
| 153 } // namespace net | 162 } // namespace net |
| 154 | 163 |
| 155 #endif // NET_SSL_SSL_INFO_H_ | 164 #endif // NET_SSL_SSL_INFO_H_ |
| OLD | NEW |