crypto: move nm_crypto_read_file() to "libnm-glib-aux"
It has no actual dependency on the crypto library. All it does, is to be careful about not leaking secrets in memory. We have code for that in libnm-glib-aux already. Move. The goal is to reduce the number of places where we use libnm-crypto, because that has a large dependency. libnm-glib-aux is a very light dependency instead.
This commit is contained in:
@@ -516,7 +516,7 @@ _cert_impl_set(NMSetting8021x *setting,
|
||||
gs_unref_bytes GBytes *file = NULL;
|
||||
|
||||
if (NM_IN_SET(property, PROP_PRIVATE_KEY, PROP_PHASE2_PRIVATE_KEY)) {
|
||||
file = nm_crypto_read_file(value, error);
|
||||
file = nm_utils_read_crypto_file_to_bytes(value, error);
|
||||
if (!file)
|
||||
goto err;
|
||||
format = nm_crypto_verify_private_key_data(g_bytes_get_data(file, NULL),
|
||||
|
Reference in New Issue
Block a user