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 #include "base/ios/block_types.h" | 9 #import "base/ios/block_types.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/mac/bind_objc_block.h" | 11 #import "base/mac/bind_objc_block.h" |
12 #import "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/threading/worker_pool.h" | 14 #include "base/threading/worker_pool.h" |
15 #include "ios/web/public/browser_state.h" | 15 #include "ios/web/public/browser_state.h" |
16 #include "ios/web/public/certificate_policy_cache.h" | 16 #include "ios/web/public/certificate_policy_cache.h" |
17 #include "ios/web/public/web_thread.h" | 17 #include "ios/web/public/web_thread.h" |
18 #import "ios/web/web_state/wk_web_view_security_util.h" | 18 #import "ios/web/web_state/wk_web_view_security_util.h" |
19 #include "net/cert/cert_verify_proc_ios.h" | 19 #include "net/cert/cert_verify_proc_ios.h" |
20 | 20 |
21 #if !defined(__has_feature) || !__has_feature(objc_arc) | 21 #if !defined(__has_feature) || !__has_feature(objc_arc) |
22 #error "This file requires ARC support." | 22 #error "This file requires ARC support." |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 | 229 |
230 web::CertPolicy::Judgment judgment = _certPolicyCache->QueryPolicy( | 230 web::CertPolicy::Judgment judgment = _certPolicyCache->QueryPolicy( |
231 leafCert.get(), base::SysNSStringToUTF8(host), certStatus); | 231 leafCert.get(), base::SysNSStringToUTF8(host), certStatus); |
232 | 232 |
233 return (judgment == web::CertPolicy::ALLOWED) | 233 return (judgment == web::CertPolicy::ALLOWED) |
234 ? web::CERT_ACCEPT_POLICY_RECOVERABLE_ERROR_ACCEPTED_BY_USER | 234 ? web::CERT_ACCEPT_POLICY_RECOVERABLE_ERROR_ACCEPTED_BY_USER |
235 : web::CERT_ACCEPT_POLICY_RECOVERABLE_ERROR_UNDECIDED_BY_USER; | 235 : web::CERT_ACCEPT_POLICY_RECOVERABLE_ERROR_UNDECIDED_BY_USER; |
236 } | 236 } |
237 | 237 |
238 @end | 238 @end |
OLD | NEW |