Skip to content

Commit 2e9243f

Browse files
author
Krzysztof Stachowiak
committed
Expand guards for conditional compilation of ALT MD API
1 parent f913940 commit 2e9243f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

features/mbedtls/targets/hash_wrappers.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "mbedtls/sha256.h"
66
#include "mbedtls/sha512.h"
77

8-
#if defined(MBEDTLS_MD2_ALT)
8+
#if defined(MBEDTLS_MD2_C) && defined(MBEDTLS_MD2_ALT)
99

1010
/**
1111
* \brief MD2 context setup
@@ -66,7 +66,7 @@ void mbedtls_md2_finish( mbedtls_md2_context *ctx,
6666

6767
#endif /* defined(MBEDTLS_MD2_ALT) */
6868

69-
#if defined(MBEDTLS_MD4_ALT)
69+
#if defined(MBEDTLS_MD4_C) && defined(MBEDTLS_MD4_ALT)
7070

7171
/**
7272
* \brief MD4 context setup
@@ -127,7 +127,7 @@ void mbedtls_md4_finish( mbedtls_md4_context *ctx,
127127

128128
#endif /* defined(MBEDTLS_MD4_ALT) */
129129

130-
#if defined(MBEDTLS_MD5_ALT)
130+
#if defined(MBEDTLS_MD5_C) && defined(MBEDTLS_MD5_ALT)
131131

132132
/**
133133
* \brief MD5 context setup
@@ -188,7 +188,7 @@ void mbedtls_md5_finish( mbedtls_md5_context *ctx,
188188

189189
#endif /* defined(MBEDTLS_MD5_ALT) */
190190

191-
#if defined(MBEDTLS_SHA1_ALT)
191+
#if defined(MBEDTLS_SHA1_C) && defined(MBEDTLS_SHA1_ALT)
192192

193193
/**
194194
* \brief SHA-1 context setup
@@ -249,7 +249,7 @@ void mbedtls_sha1_finish( mbedtls_sha1_context *ctx,
249249

250250
#endif /* defined(MBEDTLS_SHA1_ALT) */
251251

252-
#if defined(MBEDTLS_SHA256_ALT)
252+
#if defined(MBEDTLS_SHA256_C) && defined(MBEDTLS_SHA256_ALT)
253253

254254
/**
255255
* \brief This function starts a SHA-256 checksum calculation.
@@ -301,7 +301,7 @@ void mbedtls_sha256_finish( mbedtls_sha256_context *ctx,
301301

302302
#endif /* defined(MBEDTLS_SHA256_ALT) */
303303

304-
#if defined(MBEDTLS_SHA512_ALT)
304+
#if defined(MBEDTLS_SHA512_C) && defined(MBEDTLS_SHA512_ALT)
305305

306306
/**
307307
* \brief This function starts a SHA-384 or SHA-512 checksum

0 commit comments

Comments
 (0)