Chromium Code Reviews| Index: chromeos/network/client_cert_util.h |
| diff --git a/chromeos/network/certificate_pattern_matcher.h b/chromeos/network/client_cert_util.h |
| similarity index 32% |
| rename from chromeos/network/certificate_pattern_matcher.h |
| rename to chromeos/network/client_cert_util.h |
| index a79a548d06abf8fe237ab894f33fe1bf9399c4df..c05695588a9c5f0c9e9ce7dce9df4405976ec27a 100644 |
| --- a/chromeos/network/certificate_pattern_matcher.h |
| +++ b/chromeos/network/client_cert_util.h |
| @@ -2,29 +2,56 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CHROMEOS_NETWORK_CERTIFICATE_PATTERN_MATCHER_H_ |
| -#define CHROMEOS_NETWORK_CERTIFICATE_PATTERN_MATCHER_H_ |
| +#ifndef CHROMEOS_NETWORK_CLIENT_CERT_UTIL_H_ |
| +#define CHROMEOS_NETWORK_CLIENT_CERT_UTIL_H_ |
| + |
| +#include <string> |
| #include "base/memory/ref_counted.h" |
| #include "chromeos/chromeos_export.h" |
| +namespace base { |
| +class DictionaryValue; |
| +} |
| + |
| namespace net { |
| +struct CertPrincipal; |
| class X509Certificate; |
| } |
| namespace chromeos { |
| class CertificatePattern; |
| +class IssuerSubjectPattern; |
| -namespace certificate_pattern { |
| +namespace client_cert { |
| -// Fetches the matching certificate that has the latest valid start date. |
| +enum ConfigType { |
| + CONFIG_TYPE_OPENVPN, |
| + CONFIG_TYPE_IPSEC, |
| + CONFIG_TYPE_EAP |
| +}; |
| + |
| +// 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 |
| +// must match. |
| +bool CertPrincipalMatches(const IssuerSubjectPattern& pattern, |
| + const net::CertPrincipal& principal); |
| + |
| + // Fetches the matching certificate that has the latest valid start date. |
|
stevenjb
2013/08/07 19:24:47
indent
pneubeck (no reviews)
2013/08/08 11:28:29
Done.
|
| // Returns a NULL refptr if there is no such match. |
| CHROMEOS_EXPORT scoped_refptr<net::X509Certificate> GetCertificateMatch( |
| const CertificatePattern& pattern); |
| -} // namespace certificate_pattern |
| +void SetShillProperties(const ConfigType cert_config_type, |
| + const std::string& tpm_slot, |
| + const std::string& tpm_pin, |
| + const std::string& pkcs11_id, |
| + base::DictionaryValue* properties); |
| + |
| +} // namespace client_cert |
| } // namespace chromeos |
| -#endif // CHROMEOS_NETWORK_CERTIFICATE_PATTERN_MATCHER_H_ |
| +#endif // CHROMEOS_NETWORK_CLIENT_CERT_UTIL_H_ |