[email protected] | c81d9dcc | 2010-03-17 00:51:44 | [diff] [blame] | 1 | // Copyright (c) 2010 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_CERT_TEST_UTIL_H_ | ||||
6 | #define NET_BASE_CERT_TEST_UTIL_H_ | ||||
[email protected] | 32b76ef | 2010-07-26 23:08:24 | [diff] [blame] | 7 | #pragma once |
[email protected] | c81d9dcc | 2010-03-17 00:51:44 | [diff] [blame] | 8 | |
[email protected] | 32765f8 | 2010-12-16 00:01:37 | [diff] [blame] | 9 | #include <string> |
10 | |||||
11 | #include "base/ref_counted.h" | ||||
[email protected] | c81d9dcc | 2010-03-17 00:51:44 | [diff] [blame] | 12 | |
[email protected] | 864b136 | 2010-08-19 03:49:38 | [diff] [blame] | 13 | class FilePath; |
14 | |||||
[email protected] | c81d9dcc | 2010-03-17 00:51:44 | [diff] [blame] | 15 | namespace net { |
16 | |||||
17 | class X509Certificate; | ||||
18 | |||||
[email protected] | 32765f8 | 2010-12-16 00:01:37 | [diff] [blame] | 19 | // Returns a FilePath object representing the src/net/data/ssl/certificates |
20 | // directory in the source tree. | ||||
21 | FilePath GetTestCertsDirectory(); | ||||
22 | |||||
23 | // Imports a certificate file in the src/net/data/ssl/certificates directory. | ||||
24 | // certs_dir represents the test certificates directory. cert_file is the | ||||
25 | // name of the certificate file. If cert_file contains multiple certificates, | ||||
26 | // the first certificate found will be returned. | ||||
27 | scoped_refptr<X509Certificate> ImportCertFromFile(const FilePath& certs_dir, | ||||
28 | const std::string& cert_file); | ||||
[email protected] | c81d9dcc | 2010-03-17 00:51:44 | [diff] [blame] | 29 | |
30 | } // namespace net | ||||
31 | |||||
32 | #endif // NET_BASE_CERT_TEST_UTIL_H_ |