supplicant: fix crash when connecting without both 'password' and 'password-raw'
It is the case e.g. for EAP-TLS. This regression was caused by commit
b08e2b8932
.
This commit is contained in:
@@ -734,14 +734,16 @@ nm_supplicant_config_add_setting_8021x (NMSupplicantConfig *self,
|
||||
return FALSE;
|
||||
} else {
|
||||
array = nm_setting_802_1x_get_password_raw (setting);
|
||||
success = nm_supplicant_config_add_option (self,
|
||||
"password",
|
||||
(const char *)array->data,
|
||||
array->len,
|
||||
TRUE);
|
||||
if (!success) {
|
||||
nm_log_warn (LOGD_SUPPLICANT, "Error adding password-raw to supplicant config.");
|
||||
return FALSE;
|
||||
if (array) {
|
||||
success = nm_supplicant_config_add_option (self,
|
||||
"password",
|
||||
(const char *)array->data,
|
||||
array->len,
|
||||
TRUE);
|
||||
if (!success) {
|
||||
nm_log_warn (LOGD_SUPPLICANT, "Error adding password-raw to supplicant config.");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
value = nm_setting_802_1x_get_pin (setting);
|
||||
|
Reference in New Issue
Block a user