mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
9300007cf1
pkg/esp32_sdk: rename sha384_init to avoid name clash
64 lines
2.6 KiB
Diff
64 lines
2.6 KiB
Diff
From 1a3bd2c8020d9d8e36312f0a64adf9d3bf45f462 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Mikolai=20G=C3=BCtschow?= <mikolai.guetschow@tu-dresden.de>
|
|
Date: Fri, 22 Mar 2024 07:54:19 +0100
|
|
Subject: [PATCH] wpa_supplicant: add prefix wpa_ to sha384_init
|
|
|
|
Prefix `wpa_` added to `sha384_init` function of `wpa_suppplicant` to avoid name conflicts with RIOT module `sys/hashes`.
|
|
---
|
|
components/wpa_supplicant/src/crypto/crypto_internal.c | 2 +-
|
|
components/wpa_supplicant/src/crypto/sha384-internal.c | 4 ++--
|
|
components/wpa_supplicant/src/crypto/sha384_i.h | 2 +-
|
|
3 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/components/wpa_supplicant/src/crypto/crypto_internal.c b/components/wpa_supplicant/src/crypto/crypto_internal.c
|
|
index 7ff588cb..bda80730 100644
|
|
--- a/components/wpa_supplicant/src/crypto/crypto_internal.c
|
|
+++ b/components/wpa_supplicant/src/crypto/crypto_internal.c
|
|
@@ -62,7 +62,7 @@ struct crypto_hash * crypto_hash_init(enum crypto_hash_alg alg, const u8 *key,
|
|
#endif /* CONFIG_SHA256 */
|
|
#ifdef CONFIG_INTERNAL_SHA384
|
|
case CRYPTO_HASH_ALG_SHA384:
|
|
- sha384_init(&ctx->u.sha384);
|
|
+ wpa_sha384_init(&ctx->u.sha384);
|
|
break;
|
|
#endif /* CONFIG_INTERNAL_SHA384 */
|
|
#ifdef CONFIG_INTERNAL_SHA512
|
|
diff --git a/components/wpa_supplicant/src/crypto/sha384-internal.c b/components/wpa_supplicant/src/crypto/sha384-internal.c
|
|
index 646f7297..5cefa825 100644
|
|
--- a/components/wpa_supplicant/src/crypto/sha384-internal.c
|
|
+++ b/components/wpa_supplicant/src/crypto/sha384-internal.c
|
|
@@ -27,7 +27,7 @@ int sha384_vector(size_t num_elem, const u8 *addr[], const size_t *len,
|
|
struct sha384_state ctx;
|
|
size_t i;
|
|
|
|
- sha384_init(&ctx);
|
|
+ wpa_sha384_init(&ctx);
|
|
for (i = 0; i < num_elem; i++)
|
|
if (sha384_process(&ctx, addr[i], len[i]))
|
|
return -1;
|
|
@@ -49,7 +49,7 @@ int sha384_vector(size_t num_elem, const u8 *addr[], const size_t *len,
|
|
@param md The hash state you wish to initialize
|
|
@return CRYPT_OK if successful
|
|
*/
|
|
-void sha384_init(struct sha384_state *md)
|
|
+void wpa_sha384_init(struct sha384_state *md)
|
|
{
|
|
md->curlen = 0;
|
|
md->length = 0;
|
|
diff --git a/components/wpa_supplicant/src/crypto/sha384_i.h b/components/wpa_supplicant/src/crypto/sha384_i.h
|
|
index a00253ff..57860bdf 100644
|
|
--- a/components/wpa_supplicant/src/crypto/sha384_i.h
|
|
+++ b/components/wpa_supplicant/src/crypto/sha384_i.h
|
|
@@ -15,7 +15,7 @@
|
|
|
|
#define sha384_state sha512_state
|
|
|
|
-void sha384_init(struct sha384_state *md);
|
|
+void wpa_sha384_init(struct sha384_state *md);
|
|
int sha384_process(struct sha384_state *md, const unsigned char *in,
|
|
unsigned long inlen);
|
|
int sha384_done(struct sha384_state *md, unsigned char *out);
|
|
--
|
|
2.39.2
|
|
|