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 28 matching lines...) Expand all Loading... |
39 // Independent of whether the client cert (pattern or reference) is | 39 // Independent of whether the client cert (pattern or reference) is |
40 // configured, the location determines whether this network configuration | 40 // configured, the location determines whether this network configuration |
41 // supports client certs and what kind of configuration it requires. | 41 // supports client certs and what kind of configuration it requires. |
42 ConfigType location; | 42 ConfigType location; |
43 | 43 |
44 // One of the ClientCertTypes defined in ONC: kNone, kRef, or kPattern. | 44 // One of the ClientCertTypes defined in ONC: kNone, kRef, or kPattern. |
45 std::string client_cert_type; | 45 std::string client_cert_type; |
46 | 46 |
47 // If |client_cert_type| equals kPattern, this contains the pattern. | 47 // If |client_cert_type| equals kPattern, this contains the pattern. |
48 CertificatePattern pattern; | 48 CertificatePattern pattern; |
| 49 |
| 50 // The value of kIdentity, to enable substitutions. |
| 51 std::string policy_identity; |
49 }; | 52 }; |
50 | 53 |
51 // Returns true only if any fields set in this pattern match exactly with | 54 // Returns true only if any fields set in this pattern match exactly with |
52 // similar fields in the principal. If organization_ or organizational_unit_ | 55 // similar fields in the principal. If organization_ or organizational_unit_ |
53 // are set, then at least one of the organizations or units in the principal | 56 // are set, then at least one of the organizations or units in the principal |
54 // must match. | 57 // must match. |
55 bool CertPrincipalMatches(const IssuerSubjectPattern& pattern, | 58 bool CertPrincipalMatches(const IssuerSubjectPattern& pattern, |
56 const net::CertPrincipal& principal); | 59 const net::CertPrincipal& principal); |
57 | 60 |
58 // Returns the PKCS11 and slot ID of |cert_id|, which is expected to be a | 61 // Returns the PKCS11 and slot ID of |cert_id|, which is expected to be a |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // pattern within an EAP, IPsec or OpenVPN configuration. | 99 // pattern within an EAP, IPsec or OpenVPN configuration. |
97 CHROMEOS_EXPORT void OncToClientCertConfig( | 100 CHROMEOS_EXPORT void OncToClientCertConfig( |
98 const base::DictionaryValue& network_config, | 101 const base::DictionaryValue& network_config, |
99 ClientCertConfig* cert_config); | 102 ClientCertConfig* cert_config); |
100 | 103 |
101 } // namespace client_cert | 104 } // namespace client_cert |
102 | 105 |
103 } // namespace chromeos | 106 } // namespace chromeos |
104 | 107 |
105 #endif // CHROMEOS_NETWORK_CLIENT_CERT_UTIL_H_ | 108 #endif // CHROMEOS_NETWORK_CLIENT_CERT_UTIL_H_ |
OLD | NEW |