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

Side by Side Diff: chromeos/network/onc/onc_signature.cc

Issue 61903002: ChromeOS: Add more host verification options for OpenVpn. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chromeos/network/onc/onc_signature.h ('k') | chromeos/network/onc/onc_translation_tables.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chromeos/network/onc/onc_signature.h" 5 #include "chromeos/network/onc/onc_signature.h"
6 6
7 #include "components/onc/onc_constants.h" 7 #include "components/onc/onc_constants.h"
8 #include "third_party/cros_system_api/dbus/service_constants.h" 8 #include "third_party/cros_system_api/dbus/service_constants.h"
9 9
10 using base::Value; 10 using base::Value;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 { ::onc::openvpn::kServerCertPEM, &kStringSignature}, 119 { ::onc::openvpn::kServerCertPEM, &kStringSignature},
120 { ::onc::openvpn::kServerCertRef, &kStringSignature}, 120 { ::onc::openvpn::kServerCertRef, &kStringSignature},
121 { ::onc::openvpn::kServerPollTimeout, &kIntegerSignature}, 121 { ::onc::openvpn::kServerPollTimeout, &kIntegerSignature},
122 { ::onc::openvpn::kShaper, &kIntegerSignature}, 122 { ::onc::openvpn::kShaper, &kIntegerSignature},
123 { ::onc::openvpn::kStaticChallenge, &kStringSignature}, 123 { ::onc::openvpn::kStaticChallenge, &kStringSignature},
124 { ::onc::openvpn::kTLSAuthContents, &kStringSignature}, 124 { ::onc::openvpn::kTLSAuthContents, &kStringSignature},
125 { ::onc::openvpn::kTLSRemote, &kStringSignature}, 125 { ::onc::openvpn::kTLSRemote, &kStringSignature},
126 { ::onc::vpn::kUsername, &kStringSignature}, 126 { ::onc::vpn::kUsername, &kStringSignature},
127 // Not supported, yet. 127 // Not supported, yet.
128 { ::onc::openvpn::kVerb, &kStringSignature}, 128 { ::onc::openvpn::kVerb, &kStringSignature},
129 { ::onc::openvpn::kVerifyHash, &kStringSignature},
130 { ::onc::openvpn::kVerifyX509, &kVerifyX509Signature},
131 {NULL}};
132
133 const OncFieldSignature verify_x509_fields[] = {
134 { ::onc::verify_x509::kName, &kStringSignature},
135 { ::onc::verify_x509::kType, &kStringSignature},
129 {NULL}}; 136 {NULL}};
130 137
131 const OncFieldSignature vpn_fields[] = { 138 const OncFieldSignature vpn_fields[] = {
132 { ::onc::kRecommended, &kRecommendedSignature}, 139 { ::onc::kRecommended, &kRecommendedSignature},
133 { ::onc::vpn::kAutoConnect, &kBoolSignature}, 140 { ::onc::vpn::kAutoConnect, &kBoolSignature},
134 { ::onc::vpn::kHost, &kStringSignature}, 141 { ::onc::vpn::kHost, &kStringSignature},
135 { ::onc::vpn::kIPsec, &kIPsecSignature}, 142 { ::onc::vpn::kIPsec, &kIPsecSignature},
136 { ::onc::vpn::kL2TP, &kL2TPSignature}, 143 { ::onc::vpn::kL2TP, &kL2TPSignature},
137 { ::onc::vpn::kOpenVPN, &kOpenVPNSignature}, 144 { ::onc::vpn::kOpenVPN, &kOpenVPNSignature},
138 { ::onc::vpn::kType, &kStringSignature}, 145 { ::onc::vpn::kType, &kStringSignature},
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 }; 316 };
310 const OncValueSignature kIPsecSignature = { 317 const OncValueSignature kIPsecSignature = {
311 Value::TYPE_DICTIONARY, ipsec_fields, NULL 318 Value::TYPE_DICTIONARY, ipsec_fields, NULL
312 }; 319 };
313 const OncValueSignature kL2TPSignature = { 320 const OncValueSignature kL2TPSignature = {
314 Value::TYPE_DICTIONARY, l2tp_fields, NULL 321 Value::TYPE_DICTIONARY, l2tp_fields, NULL
315 }; 322 };
316 const OncValueSignature kOpenVPNSignature = { 323 const OncValueSignature kOpenVPNSignature = {
317 Value::TYPE_DICTIONARY, openvpn_fields, NULL 324 Value::TYPE_DICTIONARY, openvpn_fields, NULL
318 }; 325 };
326 const OncValueSignature kVerifyX509Signature = {
327 Value::TYPE_DICTIONARY, verify_x509_fields, NULL
328 };
319 const OncValueSignature kVPNSignature = { 329 const OncValueSignature kVPNSignature = {
320 Value::TYPE_DICTIONARY, vpn_fields, NULL 330 Value::TYPE_DICTIONARY, vpn_fields, NULL
321 }; 331 };
322 const OncValueSignature kEthernetSignature = { 332 const OncValueSignature kEthernetSignature = {
323 Value::TYPE_DICTIONARY, ethernet_fields, NULL 333 Value::TYPE_DICTIONARY, ethernet_fields, NULL
324 }; 334 };
325 const OncValueSignature kIPConfigSignature = { 335 const OncValueSignature kIPConfigSignature = {
326 Value::TYPE_DICTIONARY, ipconfig_fields, NULL 336 Value::TYPE_DICTIONARY, ipconfig_fields, NULL
327 }; 337 };
328 const OncValueSignature kProxyLocationSignature = { 338 const OncValueSignature kProxyLocationSignature = {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 if (&signature == entry->value_signature && 427 if (&signature == entry->value_signature &&
418 onc_field_name == entry->field_name) { 428 onc_field_name == entry->field_name) {
419 return true; 429 return true;
420 } 430 }
421 } 431 }
422 return false; 432 return false;
423 } 433 }
424 434
425 } // namespace onc 435 } // namespace onc
426 } // namespace chromeos 436 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_signature.h ('k') | chromeos/network/onc/onc_translation_tables.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698