| 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/socket/ssl_test_util.h" |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 | 11 |
| 12 #if defined(OS_WIN) | 12 #if defined(OS_WIN) |
| 13 #include <windows.h> | 13 #include <windows.h> |
| 14 #include <wincrypt.h> | 14 #include <wincrypt.h> |
| 15 #elif defined(OS_LINUX) | 15 #elif defined(OS_LINUX) |
| 16 #include <nspr.h> | 16 #include <nspr.h> |
| 17 #include <nss.h> | 17 #include <nss.h> |
| 18 #include <secerr.h> | 18 #include <secerr.h> |
| 19 // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=455424 | 19 // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=455424 |
| 20 // until NSS 3.12.2 comes out and we update to it. | 20 // until NSS 3.12.2 comes out and we update to it. |
| 21 #define Lock FOO_NSS_Lock | 21 #define Lock FOO_NSS_Lock |
| 22 #include <ssl.h> | 22 #include <ssl.h> |
| 23 #include <sslerr.h> | 23 #include <sslerr.h> |
| 24 #include <pk11pub.h> | 24 #include <pk11pub.h> |
| 25 #undef Lock | 25 #undef Lock |
| 26 #include "base/nss_init.h" | 26 #include "base/nss_init.h" |
| 27 #endif | 27 #endif |
| 28 | 28 |
| 29 #include "base/file_util.h" | 29 #include "base/file_util.h" |
| 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/string_util.h" | 32 #include "base/string_util.h" |
| 33 #include "net/base/tcp_pinger.h" | |
| 34 #include "net/base/host_resolver.h" | 33 #include "net/base/host_resolver.h" |
| 35 #include "net/base/tcp_client_socket.h" | |
| 36 #include "net/base/test_completion_callback.h" | 34 #include "net/base/test_completion_callback.h" |
| 35 #include "net/socket/tcp_client_socket.h" |
| 36 #include "net/socket/tcp_pinger.h" |
| 37 #include "testing/platform_test.h" | 37 #include "testing/platform_test.h" |
| 38 | 38 |
| 39 #if defined(OS_WIN) | 39 #if defined(OS_WIN) |
| 40 #pragma comment(lib, "crypt32.lib") | 40 #pragma comment(lib, "crypt32.lib") |
| 41 #endif | 41 #endif |
| 42 | 42 |
| 43 namespace { | 43 namespace { |
| 44 | 44 |
| 45 #if defined(OS_LINUX) | 45 #if defined(OS_LINUX) |
| 46 static CERTCertificate* LoadTemporaryCert(const FilePath& filename) { | 46 static CERTCertificate* LoadTemporaryCert(const FilePath& filename) { |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 "certificate to your trusted roots for this test to work. " | 357 "certificate to your trusted roots for this test to work. " |
| 358 "For more info visit:\n" | 358 "For more info visit:\n" |
| 359 "http://dev.chromium.org/developers/testing\n"; | 359 "http://dev.chromium.org/developers/testing\n"; |
| 360 return false; | 360 return false; |
| 361 } | 361 } |
| 362 #endif | 362 #endif |
| 363 return true; | 363 return true; |
| 364 } | 364 } |
| 365 | 365 |
| 366 } // namespace net | 366 } // namespace net |
| OLD | NEW |