shell/network-agent: Add method to add VPN secrets to agent response

While most secrets are serialized as individual settings with a string
value, all VPN secrets are serialized together as a string dict which is
the value of a single setting. Incorrect serialization causes VPN
secrets to not be remembered by NetworkManager.

This commit adds a new method that allows adding secrets as VPN secrets
specifically such that they can be correctly serialized.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1535>
This commit is contained in:
Sebastian Keller
2020-12-14 16:23:20 +01:00
parent f0deb03bd4
commit 087bd863b3
2 changed files with 34 additions and 1 deletions

View File

@ -43,6 +43,10 @@ struct _ShellNetworkAgentClass
/* used by SHELL_TYPE_NETWORK_AGENT */
GType shell_network_agent_get_type (void);
void shell_network_agent_add_vpn_secret (ShellNetworkAgent *self,
gchar *request_id,
gchar *setting_key,
gchar *setting_value);
void shell_network_agent_set_password (ShellNetworkAgent *self,
gchar *request_id,
gchar *setting_key,