NetworkManager/libnm-core/tests
Thomas Haller 117cbd1894 libnm: allow setting empty vpn.secrets item
Like for data, now also allow empty secrets to be added to the VPN
setting.

For one, this avoids an assertion failure, where keyfile reader wouldn't
check whether a secret key is set to the empty word.

For data, it's more clear that we want to allow setting empty data
values. VPN settings are only interpreted by the VPN plugin, so libnm
and the daemon shouldn't prevent empty settings. It can be useful to
distinguish between unset (NULL) and empty values.

For secrets, it's less clear that empty secrets shall be allowed. I
think it should. Of course, the empty secret likely isn't a correct
nor valid secret. But libnm cannot validate the secrets anyway. It's
up to the VPN plugin to handle this in any way they see fit.

Also, already before, the user could set NM_SETTING_VPN_SECRETS to
a string dictionary with empty passwords. So, the API didn't fully
prevent that. Only certain API wouldn't play along.
2020-04-04 19:51:34 +02:00
..
certs libnm/crypto: accept TPM2-wrapped PEM keys 2019-07-10 17:31:48 +02:00
meson.build license: Add license using SPDX identifiers to meson build files 2020-02-17 13:16:57 +01:00
nm-core-tests-enum-types.c.template build: use template files for enum types' sources generation 2017-12-18 11:25:06 +01:00
nm-core-tests-enum-types.h.template build: use template files for enum types' sources generation 2017-12-18 11:25:06 +01:00
test-compare.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
test-crypto.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
test-general-enums.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
test-general.c libnm: allow setting empty vpn.secrets item 2020-04-04 19:51:34 +02:00
test-keyfile.c all: use nm_clear_pointer() instead of g_clear_pointer() 2020-03-23 11:22:38 +01:00
test-secrets.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
test-setting.c all: use nm_clear_g_free() instead of g_clear_pointer() 2020-03-23 11:05:34 +01:00
test-settings-defaults.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00