OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/net/crw_cert_verification_controller.h" | 5 #import "ios/web/net/crw_cert_verification_controller.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #import "base/ios/block_types.h" | 9 #import "base/ios/block_types.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #import "base/mac/bind_objc_block.h" | 11 #import "base/mac/bind_objc_block.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/strings/sys_string_conversions.h" | 13 #include "base/strings/sys_string_conversions.h" |
14 #include "base/task_scheduler/post_task.h" | 14 #include "base/task_scheduler/post_task.h" |
15 #include "base/threading/worker_pool.h" | |
16 #include "ios/web/public/browser_state.h" | 15 #include "ios/web/public/browser_state.h" |
17 #include "ios/web/public/certificate_policy_cache.h" | 16 #include "ios/web/public/certificate_policy_cache.h" |
18 #include "ios/web/public/web_thread.h" | 17 #include "ios/web/public/web_thread.h" |
19 #import "ios/web/web_state/wk_web_view_security_util.h" | 18 #import "ios/web/web_state/wk_web_view_security_util.h" |
20 #include "net/cert/cert_verify_proc_ios.h" | 19 #include "net/cert/cert_verify_proc_ios.h" |
21 | 20 |
22 #if !defined(__has_feature) || !__has_feature(objc_arc) | 21 #if !defined(__has_feature) || !__has_feature(objc_arc) |
23 #error "This file requires ARC support." | 22 #error "This file requires ARC support." |
24 #endif | 23 #endif |
25 | 24 |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 | 234 |
236 web::CertPolicy::Judgment judgment = _certPolicyCache->QueryPolicy( | 235 web::CertPolicy::Judgment judgment = _certPolicyCache->QueryPolicy( |
237 leafCert.get(), base::SysNSStringToUTF8(host), certStatus); | 236 leafCert.get(), base::SysNSStringToUTF8(host), certStatus); |
238 | 237 |
239 return (judgment == web::CertPolicy::ALLOWED) | 238 return (judgment == web::CertPolicy::ALLOWED) |
240 ? web::CERT_ACCEPT_POLICY_RECOVERABLE_ERROR_ACCEPTED_BY_USER | 239 ? web::CERT_ACCEPT_POLICY_RECOVERABLE_ERROR_ACCEPTED_BY_USER |
241 : web::CERT_ACCEPT_POLICY_RECOVERABLE_ERROR_UNDECIDED_BY_USER; | 240 : web::CERT_ACCEPT_POLICY_RECOVERABLE_ERROR_UNDECIDED_BY_USER; |
242 } | 241 } |
243 | 242 |
244 @end | 243 @end |
OLD | NEW |