|
| 1 | +From 1a3bd2c8020d9d8e36312f0a64adf9d3bf45f462 Mon Sep 17 00:00:00 2001 |
| 2 | +From: =?UTF-8?q?Mikolai=20G=C3=BCtschow?= < [email protected]> |
| 3 | +Date: Fri, 22 Mar 2024 07:54:19 +0100 |
| 4 | +Subject: [PATCH] wpa_supplicant: add prefix wpa_ to sha384_init |
| 5 | + |
| 6 | +Prefix `wpa_` added to `sha384_init` function of `wpa_suppplicant` to avoid name conflicts with RIOT module `sys/hashes`. |
| 7 | +--- |
| 8 | + components/wpa_supplicant/src/crypto/crypto_internal.c | 2 +- |
| 9 | + components/wpa_supplicant/src/crypto/sha384-internal.c | 4 ++-- |
| 10 | + components/wpa_supplicant/src/crypto/sha384_i.h | 2 +- |
| 11 | + 3 files changed, 4 insertions(+), 4 deletions(-) |
| 12 | + |
| 13 | +diff --git a/components/wpa_supplicant/src/crypto/crypto_internal.c b/components/wpa_supplicant/src/crypto/crypto_internal.c |
| 14 | +index 7ff588cb..bda80730 100644 |
| 15 | +--- a/components/wpa_supplicant/src/crypto/crypto_internal.c |
| 16 | ++++ b/components/wpa_supplicant/src/crypto/crypto_internal.c |
| 17 | +@@ -62,7 +62,7 @@ struct crypto_hash * crypto_hash_init(enum crypto_hash_alg alg, const u8 *key, |
| 18 | + #endif /* CONFIG_SHA256 */ |
| 19 | + #ifdef CONFIG_INTERNAL_SHA384 |
| 20 | + case CRYPTO_HASH_ALG_SHA384: |
| 21 | +- sha384_init(&ctx->u.sha384); |
| 22 | ++ wpa_sha384_init(&ctx->u.sha384); |
| 23 | + break; |
| 24 | + #endif /* CONFIG_INTERNAL_SHA384 */ |
| 25 | + #ifdef CONFIG_INTERNAL_SHA512 |
| 26 | +diff --git a/components/wpa_supplicant/src/crypto/sha384-internal.c b/components/wpa_supplicant/src/crypto/sha384-internal.c |
| 27 | +index 646f7297..5cefa825 100644 |
| 28 | +--- a/components/wpa_supplicant/src/crypto/sha384-internal.c |
| 29 | ++++ b/components/wpa_supplicant/src/crypto/sha384-internal.c |
| 30 | +@@ -27,7 +27,7 @@ int sha384_vector(size_t num_elem, const u8 *addr[], const size_t *len, |
| 31 | + struct sha384_state ctx; |
| 32 | + size_t i; |
| 33 | + |
| 34 | +- sha384_init(&ctx); |
| 35 | ++ wpa_sha384_init(&ctx); |
| 36 | + for (i = 0; i < num_elem; i++) |
| 37 | + if (sha384_process(&ctx, addr[i], len[i])) |
| 38 | + return -1; |
| 39 | +@@ -49,7 +49,7 @@ int sha384_vector(size_t num_elem, const u8 *addr[], const size_t *len, |
| 40 | + @param md The hash state you wish to initialize |
| 41 | + @return CRYPT_OK if successful |
| 42 | + */ |
| 43 | +-void sha384_init(struct sha384_state *md) |
| 44 | ++void wpa_sha384_init(struct sha384_state *md) |
| 45 | + { |
| 46 | + md->curlen = 0; |
| 47 | + md->length = 0; |
| 48 | +diff --git a/components/wpa_supplicant/src/crypto/sha384_i.h b/components/wpa_supplicant/src/crypto/sha384_i.h |
| 49 | +index a00253ff..57860bdf 100644 |
| 50 | +--- a/components/wpa_supplicant/src/crypto/sha384_i.h |
| 51 | ++++ b/components/wpa_supplicant/src/crypto/sha384_i.h |
| 52 | +@@ -15,7 +15,7 @@ |
| 53 | + |
| 54 | + #define sha384_state sha512_state |
| 55 | + |
| 56 | +-void sha384_init(struct sha384_state *md); |
| 57 | ++void wpa_sha384_init(struct sha384_state *md); |
| 58 | + int sha384_process(struct sha384_state *md, const unsigned char *in, |
| 59 | + unsigned long inlen); |
| 60 | + int sha384_done(struct sha384_state *md, unsigned char *out); |
| 61 | +-- |
| 62 | +2.39.2 |
| 63 | + |
0 commit comments