| OLD | NEW | 
|---|
| 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" | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
| 31 class EVRootCAMetadata; | 31 class EVRootCAMetadata; | 
| 32 | 32 | 
| 33 #if defined(USE_NSS) | 33 #if defined(USE_NSS) | 
| 34 // Imports a private key from file |key_filename| in |dir|. The file must | 34 // Imports a private key from file |key_filename| in |dir|. The file must | 
| 35 // contain a PKCS#8 PrivateKeyInfo in DER encoding. The key is imported to | 35 // contain a PKCS#8 PrivateKeyInfo in DER encoding. The key is imported to | 
| 36 // |slot|. | 36 // |slot|. | 
| 37 scoped_ptr<crypto::RSAPrivateKey> ImportSensitiveKeyFromFile( | 37 scoped_ptr<crypto::RSAPrivateKey> ImportSensitiveKeyFromFile( | 
| 38     const base::FilePath& dir, | 38     const base::FilePath& dir, | 
| 39     const std::string& key_filename, | 39     const std::string& key_filename, | 
| 40     PK11SlotInfo* slot); | 40     PK11SlotInfo* slot); | 
|  | 41 | 
|  | 42 bool ImportClientCertToSlot(const scoped_refptr<X509Certificate>& cert, | 
|  | 43                             PK11SlotInfo* slot); | 
|  | 44 | 
|  | 45 scoped_refptr<X509Certificate> ImportClientCertAndKeyFromFile( | 
|  | 46     const base::FilePath& dir, | 
|  | 47     const std::string& cert_filename, | 
|  | 48     const std::string& key_filename, | 
|  | 49     PK11SlotInfo* slot); | 
| 41 #endif | 50 #endif | 
| 42 | 51 | 
| 43 // Imports all of the certificates in |cert_file|, a file in |certs_dir|, into a | 52 // Imports all of the certificates in |cert_file|, a file in |certs_dir|, into a | 
| 44 // CertificateList. | 53 // CertificateList. | 
| 45 CertificateList CreateCertificateListFromFile(const base::FilePath& certs_dir, | 54 CertificateList CreateCertificateListFromFile(const base::FilePath& certs_dir, | 
| 46                                               const std::string& cert_file, | 55                                               const std::string& cert_file, | 
| 47                                               int format); | 56                                               int format); | 
| 48 | 57 | 
| 49 // Imports all of the certificates in |cert_file|, a file in |certs_dir|, into | 58 // Imports all of the certificates in |cert_file|, a file in |certs_dir|, into | 
| 50 // a new X509Certificate. The first certificate in the chain will be used for | 59 // a new X509Certificate. The first certificate in the chain will be used for | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
| 75   ~ScopedTestEVPolicy(); | 84   ~ScopedTestEVPolicy(); | 
| 76 | 85 | 
| 77  private: | 86  private: | 
| 78   SHA1HashValue fingerprint_; | 87   SHA1HashValue fingerprint_; | 
| 79   EVRootCAMetadata* const ev_root_ca_metadata_; | 88   EVRootCAMetadata* const ev_root_ca_metadata_; | 
| 80 }; | 89 }; | 
| 81 | 90 | 
| 82 }  // namespace net | 91 }  // namespace net | 
| 83 | 92 | 
| 84 #endif  // NET_TEST_CERT_TEST_UTIL_H_ | 93 #endif  // NET_TEST_CERT_TEST_UTIL_H_ | 
| OLD | NEW | 
|---|