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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_COMMON_SSL_STATUS_H_
6 #define CONTENT_PUBLIC_COMMON_SSL_STATUS_H_
8 #include "content/common/content_export.h"
9 #include "content/public/common/security_style.h"
10 #include "content/public/common/signed_certificate_timestamp_id_and_status.h"
11 #include "net/cert/cert_status_flags.h"
19 // Collects the SSL information for this NavigationEntry.
20 struct CONTENT_EXPORT SSLStatus
{
21 // Flags used for the page security content status.
22 enum ContentStatusFlags
{
23 // HTTP page, or HTTPS page with no insecure content.
26 // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS).
27 DISPLAYED_INSECURE_CONTENT
= 1 << 0,
29 // HTTPS page containing "executed" HTTP resources (i.e. script).
30 // Also currently used for HTTPS page containing broken-HTTPS resources;
31 // this is wrong and should be fixed (see comments in
32 // SSLPolicy::OnRequestStarted()).
33 RAN_INSECURE_CONTENT
= 1 << 1,
37 SSLStatus(SecurityStyle security_style
,
39 const SignedCertificateTimestampIDStatusList
&
40 signed_certificate_timestamp_ids
,
41 const net::SSLInfo
& ssl_info
);
44 bool Equals(const SSLStatus
& status
) const {
45 return security_style
== status
.security_style
&&
46 cert_id
== status
.cert_id
&& cert_status
== status
.cert_status
&&
47 security_bits
== status
.security_bits
&&
48 key_exchange_info
== status
.key_exchange_info
&&
49 connection_status
== status
.connection_status
&&
50 content_status
== status
.content_status
&&
51 signed_certificate_timestamp_ids
==
52 status
.signed_certificate_timestamp_ids
;
55 content::SecurityStyle security_style
;
56 // A cert_id value of 0 indicates that it is unset or invalid.
58 net::CertStatus cert_status
;
60 int key_exchange_info
;
61 int connection_status
;
62 // A combination of the ContentStatusFlags above.
64 SignedCertificateTimestampIDStatusList signed_certificate_timestamp_ids
;
67 } // namespace content
69 #endif // CONTENT_PUBLIC_COMMON_SSL_STATUS_H_