OLD | NEW |
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 #include "net/base/cert_verify_proc_android.h" | 5 #include "net/cert/cert_verify_proc_android.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "net/android/cert_verify_result_android.h" | 11 #include "net/android/cert_verify_result_android.h" |
12 #include "net/android/network_library.h" | 12 #include "net/android/network_library.h" |
13 #include "net/base/cert_status_flags.h" | |
14 #include "net/base/cert_verify_result.h" | |
15 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
16 #include "net/base/x509_certificate.h" | 14 #include "net/cert/cert_status_flags.h" |
| 15 #include "net/cert/cert_verify_result.h" |
| 16 #include "net/cert/x509_certificate.h" |
17 | 17 |
18 namespace net { | 18 namespace net { |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 // Returns true if the certificate verification call was successful (regardless | 22 // Returns true if the certificate verification call was successful (regardless |
23 // of its result), i.e. if |verify_result| was set. Otherwise returns false. | 23 // of its result), i.e. if |verify_result| was set. Otherwise returns false. |
24 bool VerifyFromAndroidTrustManager(const std::vector<std::string>& cert_bytes, | 24 bool VerifyFromAndroidTrustManager(const std::vector<std::string>& cert_bytes, |
25 CertVerifyResult* verify_result) { | 25 CertVerifyResult* verify_result) { |
26 // TODO(joth): Fetch the authentication type from SSL rather than hardcode. | 26 // TODO(joth): Fetch the authentication type from SSL rather than hardcode. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 // Until the required support is available in the platform, we don't know if | 109 // Until the required support is available in the platform, we don't know if |
110 // the trust root at the end of the chain was standard or user-added, so we | 110 // the trust root at the end of the chain was standard or user-added, so we |
111 // mark all correctly verified certificates as issued by a known root. | 111 // mark all correctly verified certificates as issued by a known root. |
112 verify_result->is_issued_by_known_root = true; | 112 verify_result->is_issued_by_known_root = true; |
113 | 113 |
114 return OK; | 114 return OK; |
115 } | 115 } |
116 | 116 |
117 } // namespace net | 117 } // namespace net |
OLD | NEW |