Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: net/test/cert_test_util.h

Issue 394013005: Remove NSSCertDatabase from ClientCertStoreChromeOS unittest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef NET_TEST_CERT_TEST_UTIL_H_ 5 #ifndef NET_TEST_CERT_TEST_UTIL_H_
6 #define NET_TEST_CERT_TEST_UTIL_H_ 6 #define NET_TEST_CERT_TEST_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "net/cert/x509_cert_types.h" 11 #include "net/cert/x509_cert_types.h"
12 #include "net/cert/x509_certificate.h" 12 #include "net/cert/x509_certificate.h"
13 13
14 #if defined(USE_NSS)
15 #include "base/memory/scoped_ptr.h"
16 #include "crypto/rsa_private_key.h"
Ryan Sleevi 2014/07/16 19:32:18 Forward declare RSAPrivateKey. The caller of this
pneubeck (no reviews) 2014/07/16 19:49:44 Ops. Will change.
pneubeck (no reviews) 2014/07/17 13:26:43 Done.
17 #endif
18
14 namespace base { 19 namespace base {
15 class FilePath; 20 class FilePath;
16 } 21 }
17 22
18 namespace net { 23 namespace net {
19 24
20 class EVRootCAMetadata; 25 class EVRootCAMetadata;
21 26
22 // Imports all of the certificates in |cert_file|, a file in |certs_dir|, 27 #if defined(USE_NSS)
23 // // into a CertificateList. 28 // Imports a private key from file |key_filename| in |dir|. The file must
29 // contain a PKCS#8 PrivateKeyInfo in DER encoding. The key is imported to
30 // |slot|.
31 scoped_ptr<crypto::RSAPrivateKey> ImportSensitiveKeyFromFile(
32 const base::FilePath& dir,
33 const std::string& key_filename,
34 PK11SlotInfo* slot);
35 #endif
36
37 // Imports all of the certificates in |cert_file|, a file in |certs_dir|, into a
38 // CertificateList.
24 CertificateList CreateCertificateListFromFile(const base::FilePath& certs_dir, 39 CertificateList CreateCertificateListFromFile(const base::FilePath& certs_dir,
25 const std::string& cert_file, 40 const std::string& cert_file,
26 int format); 41 int format);
27 42
28 // Imports all of the certificates in |cert_file|, a file in |certs_dir|, into 43 // Imports all of the certificates in |cert_file|, a file in |certs_dir|, into
29 // a new X509Certificate. The first certificate in the chain will be used for 44 // a new X509Certificate. The first certificate in the chain will be used for
30 // the returned cert, with any additional certificates configured as 45 // the returned cert, with any additional certificates configured as
31 // intermediate certificates. 46 // intermediate certificates.
32 scoped_refptr<X509Certificate> CreateCertificateChainFromFile( 47 scoped_refptr<X509Certificate> CreateCertificateChainFromFile(
33 const base::FilePath& certs_dir, 48 const base::FilePath& certs_dir,
(...skipping 20 matching lines...) Expand all
54 ~ScopedTestEVPolicy(); 69 ~ScopedTestEVPolicy();
55 70
56 private: 71 private:
57 SHA1HashValue fingerprint_; 72 SHA1HashValue fingerprint_;
58 EVRootCAMetadata* const ev_root_ca_metadata_; 73 EVRootCAMetadata* const ev_root_ca_metadata_;
59 }; 74 };
60 75
61 } // namespace net 76 } // namespace net
62 77
63 #endif // NET_TEST_CERT_TEST_UTIL_H_ 78 #endif // NET_TEST_CERT_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698