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

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

Issue 1652603002: Add information to SSLInfo about CT EV policy compliance (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: some cleanup Created 4 years, 10 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_policy_status.h"
13 #include "net/cert/ct_verify_result.h" 14 #include "net/cert/ct_verify_result.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 class X509Certificate; 22 class X509Certificate;
22 23
(...skipping 14 matching lines...) Expand all
37 ~SSLInfo(); 38 ~SSLInfo();
38 SSLInfo& operator=(const SSLInfo& info); 39 SSLInfo& operator=(const SSLInfo& info);
39 40
40 void Reset(); 41 void Reset();
41 42
42 bool is_valid() const { return cert.get() != NULL; } 43 bool is_valid() const { return cert.get() != NULL; }
43 44
44 // Adds the specified |error| to the cert status. 45 // Adds the specified |error| to the cert status.
45 void SetCertError(int error); 46 void SetCertError(int error);
46 47
47 // Adds the SignedCertificateTimestamps from ct_verify_result to 48 // Adds the SignedCertificateTimestamps and policy compliance details
48 // |signed_certificate_timestamps|. SCTs are held in three separate vectors 49 // from ct_verify_result to |signed_certificate_timestamps| and
49 // in ct_verify_result, each vetor representing a particular verification 50 // |ct_policy_compliance_details|. SCTs are held in three separate
Ryan Sleevi 2016/02/18 06:46:52 Since you're updating this, can you fix the double
estark 2016/02/18 19:24:32 Done.
50 // state, this method associates each of the SCTs with the corresponding 51 // vectors in ct_verify_result, each vetor representing a particular
51 // SCTVerifyStatus as it adds it to the |signed_certificate_timestamps| list. 52 // verification state, this method associates each of the SCTs with
52 void UpdateSignedCertificateTimestamps( 53 // the corresponding SCTVerifyStatus as it adds it to the
54 // |signed_certificate_timestamps| list.
55 void UpdateCertificateTransparencyInfo(
53 const ct::CTVerifyResult& ct_verify_result); 56 const ct::CTVerifyResult& ct_verify_result);
54 57
55 // The SSL certificate. 58 // The SSL certificate.
56 scoped_refptr<X509Certificate> cert; 59 scoped_refptr<X509Certificate> cert;
57 60
58 // The SSL certificate as received by the client. Can be different 61 // The SSL certificate as received by the client. Can be different
59 // from |cert|, which is the chain as built by the client during 62 // from |cert|, which is the chain as built by the client during
60 // validation. 63 // validation.
61 scoped_refptr<X509Certificate> unverified_cert; 64 scoped_refptr<X509Certificate> unverified_cert;
62 65
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 HashValueVector public_key_hashes; 111 HashValueVector public_key_hashes;
109 112
110 // pinning_failure_log contains a message produced by 113 // pinning_failure_log contains a message produced by
111 // TransportSecurityState::PKPState::CheckPublicKeyPins in the event of a 114 // TransportSecurityState::PKPState::CheckPublicKeyPins in the event of a
112 // pinning failure. It is a (somewhat) human-readable string. 115 // pinning failure. It is a (somewhat) human-readable string.
113 std::string pinning_failure_log; 116 std::string pinning_failure_log;
114 117
115 // List of SignedCertificateTimestamps and their corresponding validation 118 // List of SignedCertificateTimestamps and their corresponding validation
116 // status. 119 // status.
117 SignedCertificateTimestampAndStatusList signed_certificate_timestamps; 120 SignedCertificateTimestampAndStatusList signed_certificate_timestamps;
121
122 // True if Certificate Transparency policies were applied on this
123 // connection and results are available. If true, the field below
124 // (|ev_policy_compliance|) will contain information about whether
125 // the connection complied with the policy and why the connection
126 // was considered non-compliant, if applicable.
127 bool ct_compliance_details_available;
128
129 // Whether the connection complied with the CT EV policy, and if not,
130 // why not. Only meaningful if |ct_compliance_details_available| is
131 // true.
132 ct::EVPolicyCompliance ct_ev_policy_compliance;
118 }; 133 };
119 134
120 } // namespace net 135 } // namespace net
121 136
122 #endif // NET_SSL_SSL_INFO_H_ 137 #endif // NET_SSL_SSL_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698