| 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" |
| 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_CERTS) | 14 #if defined(USE_NSS_CERTS) |
| 15 // From <pk11pub.h> | 15 // From <pk11pub.h> |
| 16 typedef struct PK11SlotInfoStr PK11SlotInfo; | 16 typedef struct PK11SlotInfoStr PK11SlotInfo; |
| 17 #endif | 17 #endif |
| 18 | 18 |
| 19 namespace base { | 19 namespace base { |
| 20 class FilePath; | 20 class FilePath; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace crypto { | |
| 24 class RSAPrivateKey; | |
| 25 } | |
| 26 | |
| 27 namespace net { | 23 namespace net { |
| 28 | 24 |
| 29 class EVRootCAMetadata; | 25 class EVRootCAMetadata; |
| 30 | 26 |
| 31 #if defined(USE_NSS_CERTS) | 27 #if defined(USE_NSS_CERTS) |
| 32 // Imports a private key from file |key_filename| in |dir| into |slot|. The file | 28 // Imports a private key from file |key_filename| in |dir| into |slot|. The file |
| 33 // must contain a PKCS#8 PrivateKeyInfo in DER encoding. Returns true on success | 29 // must contain a PKCS#8 PrivateKeyInfo in DER encoding. Returns true on success |
| 34 // and false on failure. | 30 // and false on failure. |
| 35 bool ImportSensitiveKeyFromFile(const base::FilePath& dir, | 31 bool ImportSensitiveKeyFromFile(const base::FilePath& dir, |
| 36 const std::string& key_filename, | 32 const std::string& key_filename, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 ~ScopedTestEVPolicy(); | 77 ~ScopedTestEVPolicy(); |
| 82 | 78 |
| 83 private: | 79 private: |
| 84 SHA1HashValue fingerprint_; | 80 SHA1HashValue fingerprint_; |
| 85 EVRootCAMetadata* const ev_root_ca_metadata_; | 81 EVRootCAMetadata* const ev_root_ca_metadata_; |
| 86 }; | 82 }; |
| 87 | 83 |
| 88 } // namespace net | 84 } // namespace net |
| 89 | 85 |
| 90 #endif // NET_TEST_CERT_TEST_UTIL_H_ | 86 #endif // NET_TEST_CERT_TEST_UTIL_H_ |
| OLD | NEW |