Commit cb7ca5fe authored by pneubeck@chromium.org's avatar pneubeck@chromium.org

Fix error in Shill to ONC translation.

Since the addition of CA certificate PEMs, the test of the Shill to ONC translation of OpenVPN networks logged an error.

This commit fixes this error and adds another test of the Shill to ONC translation of WiFi with EAP.

BUG=NONE

Review URL: https://chromiumcodereview.appspot.com/22837002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217095 0039d316-1c4b-4281-b951-d872f2087c98
parent f3b954af
......@@ -130,7 +130,8 @@ void ShillToONCTranslator::TranslateOpenVPN() {
field_signature->onc_field_name != NULL; ++field_signature) {
const std::string& onc_field_name = field_signature->onc_field_name;
if (onc_field_name == vpn::kSaveCredentials ||
onc_field_name == openvpn::kRemoteCertKU) {
onc_field_name == openvpn::kRemoteCertKU ||
onc_field_name == openvpn::kServerCAPEMs) {
CopyProperty(field_signature);
continue;
}
......
......@@ -85,14 +85,16 @@ INSTANTIATE_TEST_CASE_P(
ONCTranslatorShillToOncTest,
ONCTranslatorShillToOncTest,
::testing::Values(
std::make_pair("shill_l2tpipsec.json",
"translation_of_shill_l2tpipsec.onc"),
std::make_pair("shill_openvpn.json",
"translation_of_shill_openvpn.onc"),
std::make_pair("shill_openvpn_with_errors.json",
"translation_of_shill_openvpn_with_errors.onc"),
std::make_pair("shill_wifi_with_state.json",
"translation_of_shill_wifi_with_state.onc")));
std::make_pair("shill_wifi_clientcert.json",
"translation_of_shill_wifi_clientcert.onc"),
std::make_pair("shill_l2tpipsec.json",
"translation_of_shill_l2tpipsec.onc"),
std::make_pair("shill_openvpn.json",
"translation_of_shill_openvpn.onc"),
std::make_pair("shill_openvpn_with_errors.json",
"translation_of_shill_openvpn_with_errors.onc"),
std::make_pair("shill_wifi_with_state.json",
"translation_of_shill_wifi_with_state.onc")));
} // namespace onc
} // namespace chromeos
......@@ -21,6 +21,7 @@
"RemoteCertTLS": "server",
"RenegSec": 0,
"SaveCredentials": false,
"ServerCAPEMs": [ "pem1", "pem2" ],
"ServerPollTimeout": 10,
"StaticChallenge": "Please enter token OTP",
"TLSAuthContents": "-----BEGIN OpenVPN Static key V1-----\n83f8e7ccd99be189b4663e18615f9166\nd885cdea6c8accb0ebf5be304f0b8081\n5404f2a6574e029815d7a2fb65b83d0c\n676850714c6a56b23415a78e06aad6b1\n34900dd512049598382039e4816cb5ff\n1848532b71af47578c9b4a14b5bca49f\n99e0ae4dae2f4e5eadfea374aeb8fb1e\na6fdf02adc73ea778dfd43d64bf7bc75\n7779d629498f8c2fbfd32812bfdf6df7\n8cebafafef3e5496cb13202274f2768a\n1959bc53d67a70945c4c8c6f34b63327\nfb60dc84990ffec1243461e0b6310f61\ne90aee1f11fb6292d6f5fcd7cd508aab\n50d80f9963589c148cb4b933ec86128d\ned77d3fad6005b62f36369e2319f52bd\n09c6d2e52cce2362a05009dc29b6b39a\n-----END OpenVPN Static key V1-----\n",
......
{
"GUID":"{77db0089-0bc8-4358-929c-123xcv}",
"Name":"",
"Type":"WiFi",
"WiFi":{
"SSID":"SomeWifi-XY",
"Security":"WPA-EAP"
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment