NetworkManager/libnm-core/tests
Thomas Haller ef3de46c43 libnm-core: relax restrictions on input arguments for crypto_md5_hash()
crypto_md5_hash() only has two users:
 (a) crypto_make_des_aes_key()
 (b) nm_utils_uuid_generate_from_string()

For (b) it is just a complicated way to compute the MD5 hash. The
restrictions on salt and password don't matter. Actually they
are harmful because we cannot compute the MD5 hash of the empty
word.
For (a), the caller should make sure to pass whatever restrictions
he wants to enforce on the data.

For example, it is counterintuitive, that crypto_md5_hash() would
require @salt_len, enforce it to be at least 8 bytes, and then just
use the first 8 bytes. If the caller (a) wants that behavior, he
should make sure that he passes in 8 bytes.
Likewise for the empty word. If the caller does not want to compute
the hash of empty passwords, he must not hash them.

Indeed, all of this was enforced by assertions, any caller already
did the right thing.
2014-12-04 08:39:54 -05:00
..
certs libnm-core: add nm_utils_file_is_certificate() and _file_is_private_key() 2014-11-21 08:46:07 -05:00
Makefile.am libnm-core: tweak crypto.c APIs 2014-11-21 08:46:07 -05:00
test-compare.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
test-crypto.c libnm-core: relax restrictions on input arguments for crypto_md5_hash() 2014-12-04 08:39:54 -05:00
test-general.c libnm-core: fix the rule for parsing 'gateway' out of 'addresses' (rh #1170199) 2014-12-03 16:31:50 -05:00
test-secrets.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
test-setting-8021x.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
test-setting-dcb.c libnm: remove nm_utils_init() from the public API 2014-12-04 08:39:54 -05:00
test-settings-defaults.c libnm: remove nm_utils_init() from the public API 2014-12-04 08:39:54 -05:00