| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <string> | 5 #include <string> |
| 6 #include <algorithm> | 6 #include <algorithm> |
| 7 | 7 |
| 8 #include "net/base/ssl_test_util.h" | 8 #include "net/base/ssl_test_util.h" |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "base/logging.h" | 30 #include "base/logging.h" |
| 31 #include "base/path_service.h" | 31 #include "base/path_service.h" |
| 32 #include "base/platform_thread.h" | 32 #include "base/platform_thread.h" |
| 33 #include "base/string_util.h" | 33 #include "base/string_util.h" |
| 34 #include "net/base/tcp_pinger.h" | 34 #include "net/base/tcp_pinger.h" |
| 35 #include "net/base/host_resolver.h" | 35 #include "net/base/host_resolver.h" |
| 36 #include "net/base/tcp_client_socket.h" | 36 #include "net/base/tcp_client_socket.h" |
| 37 #include "net/base/test_completion_callback.h" | 37 #include "net/base/test_completion_callback.h" |
| 38 #include "testing/platform_test.h" | 38 #include "testing/platform_test.h" |
| 39 | 39 |
| 40 #if defined(OS_WIN) |
| 41 #pragma comment(lib, "crypt32.lib") |
| 42 #endif |
| 43 |
| 40 namespace { | 44 namespace { |
| 41 | 45 |
| 42 #if defined(OS_LINUX) | 46 #if defined(OS_LINUX) |
| 43 static CERTCertificate* LoadTemporaryCert(const FilePath& filename) { | 47 static CERTCertificate* LoadTemporaryCert(const FilePath& filename) { |
| 44 base::EnsureNSSInit(); | 48 base::EnsureNSSInit(); |
| 45 | 49 |
| 46 std::string rawcert; | 50 std::string rawcert; |
| 47 if (!file_util::ReadFileToString(filename.ToWStringHack(), &rawcert)) { | 51 if (!file_util::ReadFileToString(filename.ToWStringHack(), &rawcert)) { |
| 48 LOG(ERROR) << "Can't load certificate " << filename.ToWStringHack(); | 52 LOG(ERROR) << "Can't load certificate " << filename.ToWStringHack(); |
| 49 return NULL; | 53 return NULL; |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 "For more info visit:\n" | 347 "For more info visit:\n" |
| 344 "http://dev.chromium.org/developers/testing\n"; | 348 "http://dev.chromium.org/developers/testing\n"; |
| 345 return false; | 349 return false; |
| 346 } | 350 } |
| 347 #endif | 351 #endif |
| 348 return true; | 352 return true; |
| 349 } | 353 } |
| 350 | 354 |
| 351 } // namespace net | 355 } // namespace net |
| 352 | 356 |
| OLD | NEW |