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/cert/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/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 const CertificateList& additional_trust_anchors, | 391 const CertificateList& additional_trust_anchors, |
392 CertVerifyResult* verify_result) { | 392 CertVerifyResult* verify_result) { |
393 std::vector<std::string> cert_bytes; | 393 std::vector<std::string> cert_bytes; |
394 if (!GetChainDEREncodedBytes(cert, &cert_bytes)) | 394 if (!GetChainDEREncodedBytes(cert, &cert_bytes)) |
395 return ERR_CERT_INVALID; | 395 return ERR_CERT_INVALID; |
396 if (!VerifyFromAndroidTrustManager(cert_bytes, hostname, | 396 if (!VerifyFromAndroidTrustManager(cert_bytes, hostname, |
397 g_cert_net_fetcher.Get(), verify_result)) { | 397 g_cert_net_fetcher.Get(), verify_result)) { |
398 NOTREACHED(); | 398 NOTREACHED(); |
399 return ERR_FAILED; | 399 return ERR_FAILED; |
400 } | 400 } |
| 401 |
401 if (IsCertStatusError(verify_result->cert_status)) | 402 if (IsCertStatusError(verify_result->cert_status)) |
402 return MapCertStatusToNetError(verify_result->cert_status); | 403 return MapCertStatusToNetError(verify_result->cert_status); |
403 | 404 |
404 return OK; | 405 return OK; |
405 } | 406 } |
406 | 407 |
407 } // namespace net | 408 } // namespace net |
OLD | NEW |