mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-26 21:40:32 +01:00
ifcfg-rh: merge branch 'th/ifcfg-rh-802-1x-pin'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/520 (cherry picked from commit266d054808) (cherry picked from commit698acfef4b) (cherry picked from commit4d1b316f91) (cherry picked from commita4e7994ac4)
This commit is contained in:
commit
8699d27173
7 changed files with 28 additions and 8 deletions
|
|
@ -3074,6 +3074,7 @@ EXTRA_DIST += \
|
|||
src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-hex \
|
||||
src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-unquoted \
|
||||
src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wifi-wpa-psk-unquoted2 \
|
||||
src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wired-802-1x-password-raw \
|
||||
src/settings/plugins/ifcfg-rh/tests/network-scripts/keys-test-wired-8021x-peap-mschapv2 \
|
||||
src/settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-defroute-no-gatewaydev-yes \
|
||||
src/settings/plugins/ifcfg-rh/tests/network-scripts/network-test-wired-global-gateway \
|
||||
|
|
|
|||
|
|
@ -4156,8 +4156,8 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *klass)
|
|||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: password-raw-flags
|
||||
* variable: (none)
|
||||
* description: The property is not handled by ifcfg-rh plugin.
|
||||
* variable: IEEE_8021X_PASSWORD_RAW_FLAGS(+)
|
||||
* description: The secret flags for password-raw.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_PASSWORD_RAW_FLAGS] =
|
||||
|
|
@ -4345,8 +4345,8 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *klass)
|
|||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: pin
|
||||
* variable: (none)
|
||||
* description: The property is not handled by ifcfg-rh plugin.
|
||||
* variable: IEEE_8021X_PIN(+)
|
||||
* description: The pin secret used for EAP authentication methods.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_PIN] =
|
||||
|
|
@ -4363,8 +4363,8 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *klass)
|
|||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: pin-flags
|
||||
* variable: (none)
|
||||
* description: The property is not handled by ifcfg-rh plugin.
|
||||
* variable: IEEE_8021X_PIN_FLAGS(+)
|
||||
* description: The secret flags for the pin property.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_PIN_FLAGS] =
|
||||
|
|
@ -4389,8 +4389,8 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *klass)
|
|||
**/
|
||||
/* ---ifcfg-rh---
|
||||
* property: system-ca-certs
|
||||
* variable: (none)
|
||||
* description: The property is not handled by ifcfg-rh plugin.
|
||||
* variable: IEEE_8021X_SYSTEM_CA_CERTS(+)
|
||||
* description: a boolean value.
|
||||
* ---end---
|
||||
*/
|
||||
obj_properties[PROP_SYSTEM_CA_CERTS] =
|
||||
|
|
|
|||
|
|
@ -3580,6 +3580,12 @@ next:
|
|||
v = svGetValueStr (ifcfg, "IEEE_8021X_PHASE2_CA_PATH", &value);
|
||||
g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_CA_PATH, v, NULL);
|
||||
|
||||
_secret_set_from_ifcfg (s_8021x,
|
||||
ifcfg,
|
||||
keys_ifcfg,
|
||||
"IEEE_8021X_PIN",
|
||||
NM_SETTING_802_1X_PIN);
|
||||
|
||||
return g_steal_pointer (&s_8021x);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -558,6 +558,13 @@ write_8021x_setting (NMConnection *connection,
|
|||
svSetValue (ifcfg, "IEEE_8021X_PHASE2_CA_PATH",
|
||||
nm_setting_802_1x_get_phase2_ca_path (s_8021x));
|
||||
|
||||
set_secret (ifcfg,
|
||||
secrets,
|
||||
"IEEE_8021X_PIN",
|
||||
nm_setting_802_1x_get_pin (s_8021x),
|
||||
"IEEE_8021X_PIN_FLAGS",
|
||||
nm_setting_802_1x_get_pin_flags (s_8021x));
|
||||
|
||||
if (!write_8021x_certs (s_8021x, secrets, blobs, FALSE, ifcfg, error))
|
||||
return FALSE;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,3 +11,5 @@ IEEE_8021X_IDENTITY="Bill Smith"
|
|||
IEEE_8021X_CA_CERT=test_ca_cert.pem
|
||||
IEEE_8021X_INNER_AUTH_METHODS=EAP-GTC
|
||||
IEEE_8021X_PASSWORD_RAW=0408151623420001
|
||||
#IEEE_8021X_PIN=hallo1
|
||||
IEEE_8021X_PIN_FLAGS=0
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
IEEE_8021X_PIN=hallo2
|
||||
|
|
@ -2024,6 +2024,9 @@ test_read_write_802_1x_password_raw (void)
|
|||
==,
|
||||
NM_SETTING_SECRET_FLAG_NONE);
|
||||
|
||||
g_assert_cmpstr (nm_setting_802_1x_get_pin (s_8021x), ==, "hallo2");
|
||||
g_assert_cmpint (nm_setting_802_1x_get_pin_flags (s_8021x), ==, NM_SETTING_SECRET_FLAG_NONE);
|
||||
|
||||
_writer_new_connection (connection,
|
||||
TEST_SCRATCH_DIR,
|
||||
&testfile);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue