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

Unified Diff: chromeos/network/client_cert_util.cc

Issue 166063003: Check configuration for L2TP/IPsec+certificate VPN network with UIData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | chromeos/network/network_connection_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/client_cert_util.cc
diff --git a/chromeos/network/client_cert_util.cc b/chromeos/network/client_cert_util.cc
index c62c9ab17aace9c6b295ed85c423f7f3e2eaa4a6..ee1325c0d3d0362f15a312a39e358422ad9295d5 100644
--- a/chromeos/network/client_cert_util.cc
+++ b/chromeos/network/client_cert_util.cc
@@ -259,9 +259,15 @@ bool IsCertificateConfigured(const client_cert::ConfigType cert_config_type,
// OpenVPN generally requires a passphrase and we don't know whether or
// not one is required, so always return false here.
return false;
- case CONFIG_TYPE_IPSEC:
- // IPSec may require a passphrase, so return false here also.
- return false;
+ case CONFIG_TYPE_IPSEC: {
+ if (!provider_properties)
+ return false;
+
+ std::string client_cert_id;
+ provider_properties->GetStringWithoutPathExpansion(
+ shill::kL2tpIpsecClientCertIdProperty, &client_cert_id);
+ return !client_cert_id.empty();
+ }
case CONFIG_TYPE_EAP: {
std::string cert_id = GetStringFromDictionary(
service_properties, shill::kEapCertIdProperty);
« no previous file with comments | « no previous file | chromeos/network/network_connection_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698