| 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 CHROMEOS_NETWORK_CLIENT_CERT_UTIL_H_ | 5 #ifndef CHROMEOS_NETWORK_CLIENT_CERT_UTIL_H_ |
| 6 #define CHROMEOS_NETWORK_CLIENT_CERT_UTIL_H_ | 6 #define CHROMEOS_NETWORK_CLIENT_CERT_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 // Fetches the matching certificate that has the latest valid start date. | 60 // Fetches the matching certificate that has the latest valid start date. |
| 61 // Returns a NULL refptr if there is no such match. | 61 // Returns a NULL refptr if there is no such match. |
| 62 CHROMEOS_EXPORT scoped_refptr<net::X509Certificate> GetCertificateMatch( | 62 CHROMEOS_EXPORT scoped_refptr<net::X509Certificate> GetCertificateMatch( |
| 63 const CertificatePattern& pattern, | 63 const CertificatePattern& pattern, |
| 64 const net::CertificateList& all_certs); | 64 const net::CertificateList& all_certs); |
| 65 | 65 |
| 66 // If not empty, sets the TPM properties in |properties|. If |pkcs11_id| is not | 66 // If not empty, sets the TPM properties in |properties|. If |pkcs11_id| is not |
| 67 // NULL, also sets the ClientCertID. |cert_config_type| determines which | 67 // NULL, also sets the ClientCertID. |cert_config_type| determines which |
| 68 // dictionary entries to set. | 68 // dictionary entries to set. |
| 69 void SetShillProperties(const ConfigType cert_config_type, | 69 CHROMEOS_EXPORT void SetShillProperties(const ConfigType cert_config_type, |
| 70 const std::string& tpm_slot, | 70 const std::string& tpm_slot, |
| 71 const std::string& tpm_pin, | 71 const std::string& tpm_pin, |
| 72 const std::string* pkcs11_id, | 72 const std::string* pkcs11_id, |
| 73 base::DictionaryValue* properties); | 73 base::DictionaryValue* properties); |
| 74 | 74 |
| 75 // Returns true if all required configuration properties are set and not empty. | 75 // Returns true if all required configuration properties are set and not empty. |
| 76 bool IsCertificateConfigured(const client_cert::ConfigType cert_config_type, | 76 bool IsCertificateConfigured(const client_cert::ConfigType cert_config_type, |
| 77 const base::DictionaryValue& service_properties); | 77 const base::DictionaryValue& service_properties); |
| 78 | 78 |
| 79 // Determines the type of the CertificatePattern configuration, i.e. is it a | 79 // Determines the type of the CertificatePattern configuration, i.e. is it a |
| 80 // pattern within an EAP, IPsec or OpenVPN configuration. | 80 // pattern within an EAP, IPsec or OpenVPN configuration. |
| 81 CHROMEOS_EXPORT void OncToClientCertConfig( | 81 CHROMEOS_EXPORT void OncToClientCertConfig( |
| 82 const base::DictionaryValue& network_config, | 82 const base::DictionaryValue& network_config, |
| 83 ClientCertConfig* cert_config); | 83 ClientCertConfig* cert_config); |
| 84 | 84 |
| 85 } // namespace client_cert | 85 } // namespace client_cert |
| 86 | 86 |
| 87 } // namespace chromeos | 87 } // namespace chromeos |
| 88 | 88 |
| 89 #endif // CHROMEOS_NETWORK_CLIENT_CERT_UTIL_H_ | 89 #endif // CHROMEOS_NETWORK_CLIENT_CERT_UTIL_H_ |
| OLD | NEW |