Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Unified Diff: chromeos/network/client_cert_util.h

Issue 370623002: Remove most of NetworkUIData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698