Skip to content

Commit 1e6fb01

Browse files
committed
Make SHA512_NO_SHA384 depend on SHA512_C
1 parent 86a39bd commit 1e6fb01

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

include/mbedtls/check_config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,10 @@
510510
#error "MBEDTLS_RSA_C defined, but none of the PKCS1 versions enabled"
511511
#endif
512512

513+
#if defined(MBEDTLS_SHA512_NO_SHA384) && !defined(MBEDTLS_SHA512_C)
514+
#error "MBEDTLS_SHA512_NO_SHA384 defined without MBEDTLS_SHA512_C"
515+
#endif
516+
513517
#if defined(MBEDTLS_THREADING_PTHREAD)
514518
#if !defined(MBEDTLS_THREADING_C) || defined(MBEDTLS_THREADING_IMPL)
515519
#error "MBEDTLS_THREADING_PTHREAD defined, but not all prerequisites"

include/mbedtls/config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,8 @@
10391039
* Disable the SHA-384 option of the SHA-512 module. Use this to save some
10401040
* code size on devices that don't use SHA-384.
10411041
*
1042+
* Requires: MBEDTLS_SHA512_C
1043+
*
10421044
* Uncomment to disable SHA-384
10431045
*/
10441046
//#define MBEDTLS_SHA512_NO_SHA384

0 commit comments

Comments
 (0)