Skip to content

Commit

Permalink
properties: ipsec-psk-flags setting wasn't being saved
Browse files Browse the repository at this point in the history
"Store the password only for this user" option for PSK was being
ignored as 'ipsec-psk-flags' setting wasn't being saved.

Fixes #188
  • Loading branch information
dkosovic committed May 30, 2022
1 parent 66096bf commit 6d872e0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions properties/ipsec-dialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ static const char *ipsec_keys[] = {NM_L2TP_KEY_IPSEC_ENABLE,
NM_L2TP_KEY_IPSEC_IPCOMP,
NM_L2TP_KEY_IPSEC_IKEV2,
NM_L2TP_KEY_IPSEC_PFS,
NM_L2TP_KEY_IPSEC_PSK "-flags",
NM_L2TP_KEY_MACHINE_CERTPASS "-flags",
NULL};

static void
Expand Down Expand Up @@ -789,6 +791,12 @@ ipsec_dialog_new_hash_from_dialog(GtkWidget *dialog, GError **error)
if (value && *value) {
g_hash_table_insert(hash, g_strdup(NM_L2TP_KEY_IPSEC_PSK), g_strdup(value));
}
pw_flags = nma_utils_menu_to_secret_flags(widget);
if (pw_flags != NM_SETTING_SECRET_FLAG_NONE) {
g_hash_table_insert(hash,
g_strdup(NM_L2TP_KEY_IPSEC_PSK "-flags"),
g_strdup_printf("%d", pw_flags));
}

widget = GTK_WIDGET(gtk_builder_get_object(builder, "machine_ca_chooser"));
value = nma_cert_chooser_get_cert(NMA_CERT_CHOOSER(widget), NULL);
Expand Down

0 comments on commit 6d872e0

Please sign in to comment.