platform_util: Centralize deprecation
Update all files containing MBEDTLS_DEPRECATED to use the definition
from platform_util.h. This avoids duplication across multiple modules
and makes the code easier to read, understand, and maintain.
diff --git a/include/mbedtls/sha256.h b/include/mbedtls/sha256.h
index 1c59740..4a97e45 100644
--- a/include/mbedtls/sha256.h
+++ b/include/mbedtls/sha256.h
@@ -33,6 +33,8 @@
#include MBEDTLS_CONFIG_FILE
#endif
+#include "mbedtls/platform_util.h"
+
#include <stddef.h>
#include <stdint.h>
@@ -155,11 +157,6 @@
const unsigned char data[64] );
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
-#if defined(MBEDTLS_DEPRECATED_WARNING)
-#define MBEDTLS_DEPRECATED __attribute__((deprecated))
-#else
-#define MBEDTLS_DEPRECATED
-#endif
/**
* \brief This function starts a SHA-224 or SHA-256 checksum
* calculation.
@@ -216,8 +213,6 @@
*/
MBEDTLS_DEPRECATED void mbedtls_sha256_process( mbedtls_sha256_context *ctx,
const unsigned char data[64] );
-
-#undef MBEDTLS_DEPRECATED
#endif /* !MBEDTLS_DEPRECATED_REMOVED */
/**
@@ -244,12 +239,6 @@
int is224 );
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
-#if defined(MBEDTLS_DEPRECATED_WARNING)
-#define MBEDTLS_DEPRECATED __attribute__((deprecated))
-#else
-#define MBEDTLS_DEPRECATED
-#endif
-
/**
* \brief This function calculates the SHA-224 or SHA-256 checksum
* of a buffer.
@@ -274,8 +263,6 @@
size_t ilen,
unsigned char output[32],
int is224 );
-
-#undef MBEDTLS_DEPRECATED
#endif /* !MBEDTLS_DEPRECATED_REMOVED */
#if defined(MBEDTLS_SELF_TEST)