Chromium Code Reviews| Index: chromeos/network/client_cert_util.h |
| diff --git a/chromeos/network/client_cert_util.h b/chromeos/network/client_cert_util.h |
| index 5b6839dacb9e691412e20528b004accc05fa498c..18970ff63d186d18781e5818ff104a7b2a4a02de 100644 |
| --- a/chromeos/network/client_cert_util.h |
| +++ b/chromeos/network/client_cert_util.h |
| @@ -10,6 +10,7 @@ |
| #include "base/memory/ref_counted.h" |
| #include "chromeos/chromeos_export.h" |
| +#include "chromeos/network/certificate_pattern.h" |
| namespace base { |
| class DictionaryValue; |
| @@ -23,7 +24,6 @@ typedef std::vector<scoped_refptr<X509Certificate> > CertificateList; |
| namespace chromeos { |
| -class CertificatePattern; |
| class IssuerSubjectPattern; |
| namespace client_cert { |
| @@ -35,6 +35,19 @@ enum ConfigType { |
| CONFIG_TYPE_EAP |
| }; |
| +struct CHROMEOS_EXPORT ClientCertConfig { |
| + ClientCertConfig(); |
| + |
| + // Independent of whether the client cert (pattern or reference) is |
| + // configured, the location determines whether this network configuration |
| + // supports client certs and what kind of configuration it requires. |
| + ConfigType location; |
| + |
| + // One of the ClientCertTypes defined in ONC: kNone, kRef, or kPattern. |
| + std::string client_cert_type; |
|
stevenjb
2014/07/07 19:34:05
nit: WS (and maybe comment)
pneubeck (no reviews)
2014/07/09 07:51:26
Done.
|
| + CertificatePattern pattern; |
| +}; |
| + |
| // Returns true only if any fields set in this pattern match exactly with |
| // similar fields in the principal. If organization_ or organizational_unit_ |
| // are set, then at least one of the organizations or units in the principal |
| @@ -61,6 +74,12 @@ void SetShillProperties(const ConfigType cert_config_type, |
| bool IsCertificateConfigured(const client_cert::ConfigType cert_config_type, |
| const base::DictionaryValue& service_properties); |
| +// Determines the type of the CertificatePattern configuration, i.e. is it a |
| +// pattern within an EAP, IPsec or OpenVPN configuration. |
| +CHROMEOS_EXPORT void OncToClientCertConfig( |
| + const base::DictionaryValue& network_config, |
| + ClientCertConfig* cert_config); |
| + |
| } // namespace client_cert |
| } // namespace chromeos |