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> |
| 8 |
7 #include "base/ios/block_types.h" | 9 #include "base/ios/block_types.h" |
8 #include "base/logging.h" | 10 #include "base/logging.h" |
9 #include "base/mac/bind_objc_block.h" | 11 #include "base/mac/bind_objc_block.h" |
10 #include "base/mac/scoped_block.h" | 12 #include "base/mac/scoped_block.h" |
11 #import "base/memory/ref_counted.h" | 13 #import "base/memory/ref_counted.h" |
12 #import "base/memory/scoped_ptr.h" | |
13 #include "base/metrics/histogram_macros.h" | 14 #include "base/metrics/histogram_macros.h" |
14 #include "base/rand_util.h" | 15 #include "base/rand_util.h" |
15 #include "base/strings/sys_string_conversions.h" | 16 #include "base/strings/sys_string_conversions.h" |
16 #include "base/threading/worker_pool.h" | 17 #include "base/threading/worker_pool.h" |
17 #include "ios/web/net/cert_verifier_block_adapter.h" | 18 #include "ios/web/net/cert_verifier_block_adapter.h" |
18 #include "ios/web/public/browser_state.h" | 19 #include "ios/web/public/browser_state.h" |
19 #include "ios/web/public/certificate_policy_cache.h" | 20 #include "ios/web/public/certificate_policy_cache.h" |
20 #include "ios/web/public/web_thread.h" | 21 #include "ios/web/public/web_thread.h" |
21 #import "ios/web/web_state/wk_web_view_security_util.h" | 22 #import "ios/web/web_state/wk_web_view_security_util.h" |
22 #include "net/cert/cert_verify_result.h" | 23 #include "net/cert/cert_verify_result.h" |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 web::CertPolicy::Judgment judgment = _certPolicyCache->QueryPolicy( | 484 web::CertPolicy::Judgment judgment = _certPolicyCache->QueryPolicy( |
484 leafCert.get(), base::SysNSStringToUTF8(host), | 485 leafCert.get(), base::SysNSStringToUTF8(host), |
485 certVerifierResult.cert_status); | 486 certVerifierResult.cert_status); |
486 | 487 |
487 return (judgment == web::CertPolicy::ALLOWED) | 488 return (judgment == web::CertPolicy::ALLOWED) |
488 ? web::CERT_ACCEPT_POLICY_RECOVERABLE_ERROR_ACCEPTED_BY_USER | 489 ? web::CERT_ACCEPT_POLICY_RECOVERABLE_ERROR_ACCEPTED_BY_USER |
489 : web::CERT_ACCEPT_POLICY_RECOVERABLE_ERROR_UNDECIDED_BY_USER; | 490 : web::CERT_ACCEPT_POLICY_RECOVERABLE_ERROR_UNDECIDED_BY_USER; |
490 } | 491 } |
491 | 492 |
492 @end | 493 @end |
OLD | NEW |