Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Side by Side Diff: net/ssl/ssl_info.h

Issue 2040513003: Implement Expect-Staple (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "net/base/net_export.h" 11 #include "net/base/net_export.h"
12 #include "net/cert/cert_status_flags.h" 12 #include "net/cert/cert_status_flags.h"
13 #include "net/cert/ct_verify_result.h" 13 #include "net/cert/ct_verify_result.h"
14 #include "net/cert/internal/parse_ocsp.h"
14 #include "net/cert/sct_status_flags.h" 15 #include "net/cert/sct_status_flags.h"
15 #include "net/cert/x509_cert_types.h" 16 #include "net/cert/x509_cert_types.h"
16 #include "net/ssl/signed_certificate_timestamp_and_status.h" 17 #include "net/ssl/signed_certificate_timestamp_and_status.h"
17 #include "net/ssl/ssl_config.h" 18 #include "net/ssl/ssl_config.h"
18 19
19 namespace net { 20 namespace net {
20 21
21 namespace ct { 22 namespace ct {
22 23
23 enum class CertPolicyCompliance; 24 enum class CertPolicyCompliance;
24 enum class EVPolicyCompliance; 25 enum class EVPolicyCompliance;
25 26
26 } // namespace ct 27 } // namespace ct
27 28
28 class X509Certificate; 29 class X509Certificate;
29 30
30 // SSL connection info. 31 // SSL connection info.
31 // This is really a struct. All members are public. 32 // This is really a struct. All members are public.
32 class NET_EXPORT SSLInfo { 33 class NET_EXPORT SSLInfo {
33 public: 34 public:
34 // HandshakeType enumerates the possible resumption cases after an SSL 35 // HandshakeType enumerates the possible resumption cases after an SSL
35 // handshake. 36 // handshake.
36 enum HandshakeType { 37 enum HandshakeType {
37 HANDSHAKE_UNKNOWN = 0, 38 HANDSHAKE_UNKNOWN = 0,
38 HANDSHAKE_RESUME, // we resumed a previous session. 39 HANDSHAKE_RESUME, // we resumed a previous session.
39 HANDSHAKE_FULL, // we negotiated a new session. 40 HANDSHAKE_FULL, // we negotiated a new session.
40 }; 41 };
41 42
43 struct OCSPStaple {
44 OCSPStaple();
45 ~OCSPStaple();
46
47 bool is_valid_date;
48 bool is_correct_certificate;
49 OCSPCertStatus::Status status;
50 };
51
42 SSLInfo(); 52 SSLInfo();
43 SSLInfo(const SSLInfo& info); 53 SSLInfo(const SSLInfo& info);
44 ~SSLInfo(); 54 ~SSLInfo();
45 SSLInfo& operator=(const SSLInfo& info); 55 SSLInfo& operator=(const SSLInfo& info);
46 56
47 void Reset(); 57 void Reset();
48 58
49 bool is_valid() const { return cert.get() != NULL; } 59 bool is_valid() const { return cert.get() != NULL; }
50 60
51 // Adds the specified |error| to the cert status. 61 // Adds the specified |error| to the cert status.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 144
135 // Whether the connection complied with the CT EV policy, and if not, 145 // Whether the connection complied with the CT EV policy, and if not,
136 // why not. Only meaningful if |ct_compliance_details_available| is 146 // why not. Only meaningful if |ct_compliance_details_available| is
137 // true. 147 // true.
138 ct::EVPolicyCompliance ct_ev_policy_compliance; 148 ct::EVPolicyCompliance ct_ev_policy_compliance;
139 149
140 // Whether the connection complied with the CT cert policy, and if 150 // Whether the connection complied with the CT cert policy, and if
141 // not, why not. Only meaningful it |ct_compliance_details_available| 151 // not, why not. Only meaningful it |ct_compliance_details_available|
142 // is true. 152 // is true.
143 ct::CertPolicyCompliance ct_cert_policy_compliance; 153 ct::CertPolicyCompliance ct_cert_policy_compliance;
154
155 std::vector<OCSPStaple> ocsp_staples;
144 }; 156 };
145 157
146 } // namespace net 158 } // namespace net
147 159
148 #endif // NET_SSL_SSL_INFO_H_ 160 #endif // NET_SSL_SSL_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698