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

Side by Side Diff: ios/web/navigation/crw_session_certificate_policy_manager.mm

Issue 2076363002: Introduce the ability to require CT for specific hosts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@require_ct_enforcer
Patch Set: Android is weird Created 4 years, 5 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
« no previous file with comments | « no previous file | net/base/net_error_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #import "ios/web/navigation/crw_session_certificate_policy_manager.h" 5 #import "ios/web/navigation/crw_session_certificate_policy_manager.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/location.h" 11 #include "base/location.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/strings/sys_string_conversions.h" 13 #include "base/strings/sys_string_conversions.h"
14 #include "ios/web/public/certificate_policy_cache.h" 14 #include "ios/web/public/certificate_policy_cache.h"
15 #include "ios/web/public/web_thread.h" 15 #include "ios/web/public/web_thread.h"
16 #include "net/base/hash_value.h" 16 #include "net/base/hash_value.h"
17 #include "net/cert/x509_certificate.h" 17 #include "net/cert/x509_certificate.h"
18 18
19 // Break if we detect that CertStatus values changed, because we persist them on 19 // Break if we detect that CertStatus values changed, because we persist them on
20 // disk and thus require them to be consistent. 20 // disk and thus require them to be consistent.
21 static_assert(net::CERT_STATUS_ALL_ERRORS == 0xFFFF, 21 static_assert(net::CERT_STATUS_ALL_ERRORS == 0xFF00FFFF,
22 "The value of CERT_STATUS_ALL_ERRORS changed!"); 22 "The value of CERT_STATUS_ALL_ERRORS changed!");
23 static_assert(net::CERT_STATUS_COMMON_NAME_INVALID == 1 << 0, 23 static_assert(net::CERT_STATUS_COMMON_NAME_INVALID == 1 << 0,
24 "The value of CERT_STATUS_COMMON_NAME_INVALID changed!"); 24 "The value of CERT_STATUS_COMMON_NAME_INVALID changed!");
25 static_assert(net::CERT_STATUS_DATE_INVALID == 1 << 1, 25 static_assert(net::CERT_STATUS_DATE_INVALID == 1 << 1,
26 "The value of CERT_STATUS_DATE_INVALID changed!"); 26 "The value of CERT_STATUS_DATE_INVALID changed!");
27 static_assert(net::CERT_STATUS_AUTHORITY_INVALID == 1 << 2, 27 static_assert(net::CERT_STATUS_AUTHORITY_INVALID == 1 << 2,
28 "The value of CERT_STATUS_AUTHORITY_INVALID changed!"); 28 "The value of CERT_STATUS_AUTHORITY_INVALID changed!");
29 static_assert(net::CERT_STATUS_NO_REVOCATION_MECHANISM == 1 << 4, 29 static_assert(net::CERT_STATUS_NO_REVOCATION_MECHANISM == 1 << 4,
30 "The value of CERT_STATUS_NO_REVOCATION_MECHANISM changed!"); 30 "The value of CERT_STATUS_NO_REVOCATION_MECHANISM changed!");
31 static_assert(net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION == 1 << 5, 31 static_assert(net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION == 1 << 5,
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 181 }
182 182
183 - (id)copyWithZone:(NSZone*)zone { 183 - (id)copyWithZone:(NSZone*)zone {
184 DCHECK([NSThread isMainThread]); 184 DCHECK([NSThread isMainThread]);
185 CRWSessionCertificatePolicyManager* copy = [[[self class] alloc] init]; 185 CRWSessionCertificatePolicyManager* copy = [[[self class] alloc] init];
186 copy->allowed_ = allowed_; 186 copy->allowed_ = allowed_;
187 return copy; 187 return copy;
188 } 188 }
189 189
190 @end 190 @end
OLDNEW
« no previous file with comments | « no previous file | net/base/net_error_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698