From 964ae8cc391520440cf5aa13e2b9cc34850ea6c2 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 26 Feb 2019 19:01:41 +0100 Subject: New upstream version 1.14.6 --- libnm-core/nm-crypto.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'libnm-core/nm-crypto.c') diff --git a/libnm-core/nm-crypto.c b/libnm-core/nm-crypto.c index dc8f1c15..1af2ea28 100644 --- a/libnm-core/nm-crypto.c +++ b/libnm-core/nm-crypto.c @@ -879,13 +879,10 @@ nm_crypto_md5_hash (const guint8 *salt, gsize buflen) { nm_auto_free_checksum GChecksum *ctx = NULL; -#define MD5_DIGEST_LEN 16 - nm_auto_clear_static_secret_ptr const NMSecretPtr digest = NM_SECRET_PTR_STATIC (MD5_DIGEST_LEN); + nm_auto_clear_static_secret_ptr const NMSecretPtr digest = NM_SECRET_PTR_STATIC (NM_UTILS_CHECKSUM_LENGTH_MD5); gsize bufidx = 0; int i; - nm_assert (g_checksum_type_get_length (G_CHECKSUM_MD5) == MD5_DIGEST_LEN); - g_return_if_fail (password_len == 0 || password); g_return_if_fail (buffer); g_return_if_fail (buflen > 0); @@ -894,25 +891,21 @@ nm_crypto_md5_hash (const guint8 *salt, ctx = g_checksum_new (G_CHECKSUM_MD5); for (;;) { - gsize digest_len; - if (password_len > 0) g_checksum_update (ctx, (const guchar *) password, password_len); if (salt_len > 0) g_checksum_update (ctx, (const guchar *) salt, salt_len); - digest_len = MD5_DIGEST_LEN; - g_checksum_get_digest (ctx, digest.bin, &digest_len); - nm_assert (digest_len == MD5_DIGEST_LEN); + nm_utils_checksum_get_digest_len (ctx, digest.bin, NM_UTILS_CHECKSUM_LENGTH_MD5); - for (i = 0; i < MD5_DIGEST_LEN; i++) { + for (i = 0; i < NM_UTILS_CHECKSUM_LENGTH_MD5; i++) { if (bufidx >= buflen) return; buffer[bufidx++] = digest.bin[i]; } g_checksum_reset (ctx); - g_checksum_update (ctx, digest.ptr, MD5_DIGEST_LEN); + g_checksum_update (ctx, digest.ptr, NM_UTILS_CHECKSUM_LENGTH_MD5); } } -- cgit 1.3.0-6-gf8a5 From 9a6dcbf895f9da01768e64b73cec88c16157d91e Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 26 Mar 2019 23:25:23 +0100 Subject: New upstream version 1.16.0 --- libnm-core/nm-crypto.c | 1 - 1 file changed, 1 deletion(-) (limited to 'libnm-core/nm-crypto.c') diff --git a/libnm-core/nm-crypto.c b/libnm-core/nm-crypto.c index 1af2ea28..67f206c4 100644 --- a/libnm-core/nm-crypto.c +++ b/libnm-core/nm-crypto.c @@ -25,7 +25,6 @@ #include "nm-crypto.h" -#include #include #include #include -- cgit 1.3.0-6-gf8a5 From 85563b7fc7ec2cd21e38debb9b28db342e2e8e7c Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 21 Apr 2019 21:09:51 +0200 Subject: New upstream version 1.18.0 --- libnm-core/nm-crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libnm-core/nm-crypto.c') diff --git a/libnm-core/nm-crypto.c b/libnm-core/nm-crypto.c index 67f206c4..c7142216 100644 --- a/libnm-core/nm-crypto.c +++ b/libnm-core/nm-crypto.c @@ -29,8 +29,8 @@ #include #include -#include "nm-utils/nm-secret-utils.h" -#include "nm-utils/nm-io-utils.h" +#include "nm-glib-aux/nm-secret-utils.h" +#include "nm-glib-aux/nm-io-utils.h" #include "nm-crypto-impl.h" #include "nm-utils.h" -- cgit 1.3.0-6-gf8a5