| 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 <memory> | 5 #include <memory> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 9704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9715 #else | 9715 #else |
| 9716 return false; | 9716 return false; |
| 9717 #endif | 9717 #endif |
| 9718 } | 9718 } |
| 9719 | 9719 |
| 9720 // SystemUsesChromiumEVMetadata returns true iff the current operating system | 9720 // SystemUsesChromiumEVMetadata returns true iff the current operating system |
| 9721 // uses Chromium's EV metadata (i.e. EVRootCAMetadata). If it does not, then | 9721 // uses Chromium's EV metadata (i.e. EVRootCAMetadata). If it does not, then |
| 9722 // several tests are effected because our testing EV certificate won't be | 9722 // several tests are effected because our testing EV certificate won't be |
| 9723 // recognised as EV. | 9723 // recognised as EV. |
| 9724 static bool SystemUsesChromiumEVMetadata() { | 9724 static bool SystemUsesChromiumEVMetadata() { |
| 9725 #if defined(USE_OPENSSL_CERTS) && !defined(OS_ANDROID) | 9725 #if defined(OS_ANDROID) |
| 9726 // http://crbug.com/117478 - OpenSSL does not support EV validation. | |
| 9727 return false; | |
| 9728 #elif defined(OS_ANDROID) | |
| 9729 // On Android, we use the system to tell us whether a certificate is EV or not | 9726 // On Android, we use the system to tell us whether a certificate is EV or not |
| 9730 // and the system won't recognise our testing root. | 9727 // and the system won't recognise our testing root. |
| 9731 return false; | 9728 return false; |
| 9732 #else | 9729 #else |
| 9733 return true; | 9730 return true; |
| 9734 #endif | 9731 #endif |
| 9735 } | 9732 } |
| 9736 | 9733 |
| 9737 // Returns the expected CertStatus for tests that expect an online revocation | 9734 // Returns the expected CertStatus for tests that expect an online revocation |
| 9738 // check failure as a result of checking a test EV cert, which will not | 9735 // check failure as a result of checking a test EV cert, which will not |
| (...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11069 AddTestInterceptor()->set_main_intercept_job(std::move(job)); | 11066 AddTestInterceptor()->set_main_intercept_job(std::move(job)); |
| 11070 | 11067 |
| 11071 req->Start(); | 11068 req->Start(); |
| 11072 req->Cancel(); | 11069 req->Cancel(); |
| 11073 base::RunLoop().RunUntilIdle(); | 11070 base::RunLoop().RunUntilIdle(); |
| 11074 EXPECT_EQ(ERR_ABORTED, d.request_status()); | 11071 EXPECT_EQ(ERR_ABORTED, d.request_status()); |
| 11075 EXPECT_EQ(0, d.received_redirect_count()); | 11072 EXPECT_EQ(0, d.received_redirect_count()); |
| 11076 } | 11073 } |
| 11077 | 11074 |
| 11078 } // namespace net | 11075 } // namespace net |
| OLD | NEW |