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

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

Issue 16946002: Resolve certificate references in ONC by PEM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a unit test for the resolve function. Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
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_translation_tables.h" 5 #include "chromeos/network/onc/onc_translation_tables.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chromeos/network/onc/onc_constants.h" 10 #include "chromeos/network/onc/onc_constants.h"
(...skipping 15 matching lines...) Expand all
26 const FieldTranslationEntry eap_fields[] = { 26 const FieldTranslationEntry eap_fields[] = {
27 { eap::kAnonymousIdentity, flimflam::kEapAnonymousIdentityProperty }, 27 { eap::kAnonymousIdentity, flimflam::kEapAnonymousIdentityProperty },
28 { eap::kIdentity, flimflam::kEapIdentityProperty }, 28 { eap::kIdentity, flimflam::kEapIdentityProperty },
29 // This field is converted during translation, see onc_translator_*. 29 // This field is converted during translation, see onc_translator_*.
30 // { eap::kInner, flimflam::kEapPhase2AuthProperty }, 30 // { eap::kInner, flimflam::kEapPhase2AuthProperty },
31 31
32 // This field is converted during translation, see onc_translator_*. 32 // This field is converted during translation, see onc_translator_*.
33 // { eap::kOuter, flimflam::kEapMethodProperty }, 33 // { eap::kOuter, flimflam::kEapMethodProperty },
34 { eap::kPassword, flimflam::kEapPasswordProperty }, 34 { eap::kPassword, flimflam::kEapPasswordProperty },
35 { eap::kSaveCredentials, flimflam::kSaveCredentialsProperty }, 35 { eap::kSaveCredentials, flimflam::kSaveCredentialsProperty },
36 { eap::kServerCARef, flimflam::kEapCaCertNssProperty }, 36 { eap::kServerCAPEMs, shill::kEapCaCertPemProperty },
37 { eap::kUseSystemCAs, flimflam::kEapUseSystemCasProperty }, 37 { eap::kUseSystemCAs, flimflam::kEapUseSystemCasProperty },
38 { NULL } 38 { NULL }
39 }; 39 };
40 40
41 const FieldTranslationEntry ipsec_fields[] = { 41 const FieldTranslationEntry ipsec_fields[] = {
42 // Ignored by Shill, not necessary to synchronize. 42 // Ignored by Shill, not necessary to synchronize.
43 // { ipsec::kAuthenticationType, flimflam::kL2tpIpsecAuthenticationType }, 43 // { ipsec::kAuthenticationType, flimflam::kL2tpIpsecAuthenticationType },
44 { ipsec::kGroup, shill::kL2tpIpsecTunnelGroupProperty }, 44 { ipsec::kGroup, shill::kL2tpIpsecTunnelGroupProperty },
45 // Ignored by Shill, not necessary to synchronize. 45 // Ignored by Shill, not necessary to synchronize.
46 // { ipsec::kIKEVersion, flimflam::kL2tpIpsecIkeVersion }, 46 // { ipsec::kIKEVersion, flimflam::kL2tpIpsecIkeVersion },
47 { ipsec::kPSK, flimflam::kL2tpIpsecPskProperty }, 47 { ipsec::kPSK, flimflam::kL2tpIpsecPskProperty },
48 { vpn::kSaveCredentials, flimflam::kSaveCredentialsProperty }, 48 { vpn::kSaveCredentials, flimflam::kSaveCredentialsProperty },
49 { ipsec::kServerCARef, flimflam::kL2tpIpsecCaCertNssProperty }, 49 { ipsec::kServerCAPEMs, shill::kL2tpIpsecCaCertPemProperty },
50 { NULL } 50 { NULL }
51 }; 51 };
52 52
53 const FieldTranslationEntry l2tp_fields[] = { 53 const FieldTranslationEntry l2tp_fields[] = {
54 { vpn::kPassword, flimflam::kL2tpIpsecPasswordProperty }, 54 { vpn::kPassword, flimflam::kL2tpIpsecPasswordProperty },
55 // We don't synchronize l2tp's SaveCredentials field for now, as Shill doesn't 55 // We don't synchronize l2tp's SaveCredentials field for now, as Shill doesn't
56 // support separate settings for ipsec and l2tp. 56 // support separate settings for ipsec and l2tp.
57 // { vpn::kSaveCredentials, &kBoolSignature }, 57 // { vpn::kSaveCredentials, &kBoolSignature },
58 { vpn::kUsername, flimflam::kL2tpIpsecUserProperty }, 58 { vpn::kUsername, flimflam::kL2tpIpsecUserProperty },
59 { NULL } 59 { NULL }
(...skipping 11 matching lines...) Expand all
71 { vpn::kPassword, flimflam::kOpenVPNPasswordProperty }, 71 { vpn::kPassword, flimflam::kOpenVPNPasswordProperty },
72 { openvpn::kPort, flimflam::kOpenVPNPortProperty }, 72 { openvpn::kPort, flimflam::kOpenVPNPortProperty },
73 { openvpn::kProto, flimflam::kOpenVPNProtoProperty }, 73 { openvpn::kProto, flimflam::kOpenVPNProtoProperty },
74 { openvpn::kPushPeerInfo, flimflam::kOpenVPNPushPeerInfoProperty }, 74 { openvpn::kPushPeerInfo, flimflam::kOpenVPNPushPeerInfoProperty },
75 { openvpn::kRemoteCertEKU, flimflam::kOpenVPNRemoteCertEKUProperty }, 75 { openvpn::kRemoteCertEKU, flimflam::kOpenVPNRemoteCertEKUProperty },
76 // This field is converted during translation, see onc_translator_*. 76 // This field is converted during translation, see onc_translator_*.
77 // { openvpn::kRemoteCertKU, flimflam::kOpenVPNRemoteCertKUProperty }, 77 // { openvpn::kRemoteCertKU, flimflam::kOpenVPNRemoteCertKUProperty },
78 { openvpn::kRemoteCertTLS, flimflam::kOpenVPNRemoteCertTLSProperty }, 78 { openvpn::kRemoteCertTLS, flimflam::kOpenVPNRemoteCertTLSProperty },
79 { openvpn::kRenegSec, flimflam::kOpenVPNRenegSecProperty }, 79 { openvpn::kRenegSec, flimflam::kOpenVPNRenegSecProperty },
80 { vpn::kSaveCredentials, flimflam::kSaveCredentialsProperty }, 80 { vpn::kSaveCredentials, flimflam::kSaveCredentialsProperty },
81 { openvpn::kServerCARef, flimflam::kOpenVPNCaCertNSSProperty }, 81 { openvpn::kServerCAPEMs, shill::kOpenVPNCaCertPemProperty },
82 { openvpn::kServerPollTimeout, flimflam::kOpenVPNServerPollTimeoutProperty }, 82 { openvpn::kServerPollTimeout, flimflam::kOpenVPNServerPollTimeoutProperty },
83 { openvpn::kShaper, flimflam::kOpenVPNShaperProperty }, 83 { openvpn::kShaper, flimflam::kOpenVPNShaperProperty },
84 { openvpn::kStaticChallenge, flimflam::kOpenVPNStaticChallengeProperty }, 84 { openvpn::kStaticChallenge, flimflam::kOpenVPNStaticChallengeProperty },
85 { openvpn::kTLSAuthContents, flimflam::kOpenVPNTLSAuthContentsProperty }, 85 { openvpn::kTLSAuthContents, flimflam::kOpenVPNTLSAuthContentsProperty },
86 { openvpn::kTLSRemote, flimflam::kOpenVPNTLSRemoteProperty }, 86 { openvpn::kTLSRemote, flimflam::kOpenVPNTLSRemoteProperty },
87 { vpn::kUsername, flimflam::kOpenVPNUserProperty }, 87 { vpn::kUsername, flimflam::kOpenVPNUserProperty },
88 { NULL } 88 { NULL }
89 }; 89 };
90 90
91 const FieldTranslationEntry vpn_fields[] = { 91 const FieldTranslationEntry vpn_fields[] = {
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 continue; 270 continue;
271 *onc_value = table[i].onc_value; 271 *onc_value = table[i].onc_value;
272 return true; 272 return true;
273 } 273 }
274 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; 274 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC";
275 return false; 275 return false;
276 } 276 }
277 277
278 } // namespace onc 278 } // namespace onc
279 } // namespace chromeos 279 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_test_utils.cc ('k') | chromeos/network/onc/onc_translator_onc_to_shill.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698