OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NET_BASE_SSL_TEST_UTIL_H_ |
| 6 #define NET_BASE_SSL_TEST_UTIL_H_ |
| 7 |
| 8 #include "build/build_config.h" |
| 9 |
| 10 #include "base/file_path.h" |
| 11 |
| 12 // TODO(dkegel): share this between net/base and |
| 13 // chrome/browser without putting it in net.lib |
| 14 |
| 15 class SSLTestUtil { |
| 16 public: |
| 17 SSLTestUtil(); |
| 18 |
| 19 ~SSLTestUtil(); |
| 20 |
| 21 FilePath GetRootCertPath(); |
| 22 |
| 23 FilePath GetOKCertPath(); |
| 24 |
| 25 FilePath GetExpiredCertPath(); |
| 26 |
| 27 // Hostname to use for test server |
| 28 static const char kHostName[]; |
| 29 |
| 30 // Port to use for test server |
| 31 static const int kOKHTTPSPort; |
| 32 |
| 33 // Port to use for bad test server |
| 34 static const int kBadHTTPSPort; |
| 35 |
| 36 // Issuer name of the cert that should be trusted for the test to work. |
| 37 static const wchar_t kCertIssuerName[]; |
| 38 |
| 39 // Returns false if our test root certificate is not trusted. |
| 40 bool CheckCATrusted(); |
| 41 |
| 42 private: |
| 43 FilePath cert_dir_; |
| 44 |
| 45 #if defined(OS_LINUX) |
| 46 struct PrivateCERTCertificate; |
| 47 PrivateCERTCertificate *cert_; |
| 48 #endif |
| 49 |
| 50 DISALLOW_COPY_AND_ASSIGN(SSLTestUtil); |
| 51 }; |
| 52 |
| 53 #endif // NET_BASE_SSL_TEST_UTIL_H_ |
OLD | NEW |