| 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <shlobj.h> | 9 #include <shlobj.h> |
| 10 #endif | 10 #endif |
| (...skipping 6997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7008 #else | 7008 #else |
| 7009 return false; | 7009 return false; |
| 7010 #endif | 7010 #endif |
| 7011 } | 7011 } |
| 7012 | 7012 |
| 7013 // SystemUsesChromiumEVMetadata returns true iff the current operating system | 7013 // SystemUsesChromiumEVMetadata returns true iff the current operating system |
| 7014 // uses Chromium's EV metadata (i.e. EVRootCAMetadata). If it does not, then | 7014 // uses Chromium's EV metadata (i.e. EVRootCAMetadata). If it does not, then |
| 7015 // several tests are effected because our testing EV certificate won't be | 7015 // several tests are effected because our testing EV certificate won't be |
| 7016 // recognised as EV. | 7016 // recognised as EV. |
| 7017 static bool SystemUsesChromiumEVMetadata() { | 7017 static bool SystemUsesChromiumEVMetadata() { |
| 7018 #if defined(USE_OPENSSL) | 7018 #if defined(USE_OPENSSL_CERTS) && !defined(OS_ANDROID) |
| 7019 // http://crbug.com/117478 - OpenSSL does not support EV validation. | 7019 // http://crbug.com/117478 - OpenSSL does not support EV validation. |
| 7020 return false; | 7020 return false; |
| 7021 #elif defined(OS_MACOSX) && !defined(OS_IOS) | 7021 #elif (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_ANDROID) |
| 7022 // On OS X, we use the system to tell us whether a certificate is EV or not | 7022 // On OS X and Android, we use the system to tell us whether a certificate is |
| 7023 // and the system won't recognise our testing root. | 7023 // EV or not and the system won't recognise our testing root. |
| 7024 return false; | 7024 return false; |
| 7025 #else | 7025 #else |
| 7026 return true; | 7026 return true; |
| 7027 #endif | 7027 #endif |
| 7028 } | 7028 } |
| 7029 | 7029 |
| 7030 static bool SystemSupportsOCSP() { | 7030 static bool SystemSupportsOCSP() { |
| 7031 #if defined(USE_OPENSSL) | 7031 #if defined(USE_OPENSSL) |
| 7032 // http://crbug.com/117478 - OpenSSL does not support OCSP. | 7032 // http://crbug.com/117478 - OpenSSL does not support OCSP. |
| 7033 return false; | 7033 return false; |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7739 | 7739 |
| 7740 EXPECT_FALSE(r.is_pending()); | 7740 EXPECT_FALSE(r.is_pending()); |
| 7741 EXPECT_EQ(1, d->response_started_count()); | 7741 EXPECT_EQ(1, d->response_started_count()); |
| 7742 EXPECT_FALSE(d->received_data_before_response()); | 7742 EXPECT_FALSE(d->received_data_before_response()); |
| 7743 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); | 7743 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); |
| 7744 } | 7744 } |
| 7745 } | 7745 } |
| 7746 #endif // !defined(DISABLE_FTP_SUPPORT) | 7746 #endif // !defined(DISABLE_FTP_SUPPORT) |
| 7747 | 7747 |
| 7748 } // namespace net | 7748 } // namespace net |
| OLD | NEW |