| 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_BASE_CERT_TEST_UTIL_H_ | 5 #ifndef NET_BASE_CERT_TEST_UTIL_H_ |
| 6 #define NET_BASE_CERT_TEST_UTIL_H_ | 6 #define NET_BASE_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 22 matching lines...) Expand all Loading... |
| 33 const std::string& cert_file); | 33 const std::string& cert_file); |
| 34 | 34 |
| 35 // ScopedTestEVPolicy causes certificates marked with |policy|, issued from a | 35 // ScopedTestEVPolicy causes certificates marked with |policy|, issued from a |
| 36 // root with the given fingerprint, to be treated as EV. |policy| is expressed | 36 // root with the given fingerprint, to be treated as EV. |policy| is expressed |
| 37 // as a string of dotted numbers: i.e. "1.2.3.4". | 37 // as a string of dotted numbers: i.e. "1.2.3.4". |
| 38 // This should only be used in unittests as adding a CA twice causes a CHECK | 38 // This should only be used in unittests as adding a CA twice causes a CHECK |
| 39 // failure. | 39 // failure. |
| 40 class ScopedTestEVPolicy { | 40 class ScopedTestEVPolicy { |
| 41 public: | 41 public: |
| 42 ScopedTestEVPolicy(EVRootCAMetadata* ev_root_ca_metadata, | 42 ScopedTestEVPolicy(EVRootCAMetadata* ev_root_ca_metadata, |
| 43 const SHA1Fingerprint& fingerprint, | 43 const SHA1HashValue& fingerprint, |
| 44 const char* policy); | 44 const char* policy); |
| 45 ~ScopedTestEVPolicy(); | 45 ~ScopedTestEVPolicy(); |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 SHA1Fingerprint fingerprint_; | 48 SHA1HashValue fingerprint_; |
| 49 EVRootCAMetadata* const ev_root_ca_metadata_; | 49 EVRootCAMetadata* const ev_root_ca_metadata_; |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 } // namespace net | 52 } // namespace net |
| 53 | 53 |
| 54 #endif // NET_BASE_CERT_TEST_UTIL_H_ | 54 #endif // NET_BASE_CERT_TEST_UTIL_H_ |
| OLD | NEW |