From 316b7dd19cae7db2883bf3a8431cacd4b0f3353e Mon Sep 17 00:00:00 2001 From: Andrzej Kurek Date: Wed, 5 Apr 2023 14:44:38 -0400 Subject: [PATCH] Add a justification for early md.h include in programs Signed-off-by: Andrzej Kurek --- programs/pkey/dh_server.c | 1 + programs/pkey/pk_sign.c | 1 + programs/pkey/pk_verify.c | 1 + programs/pkey/rsa_sign.c | 1 + programs/pkey/rsa_sign_pss.c | 1 + programs/pkey/rsa_verify.c | 1 + programs/pkey/rsa_verify_pss.c | 1 + programs/psa/key_ladder_demo.c | 1 + programs/x509/cert_req.c | 1 + programs/x509/cert_write.c | 1 + 10 files changed, 10 insertions(+) diff --git a/programs/pkey/dh_server.c b/programs/pkey/dh_server.c index 54165dcf9..b883653eb 100644 --- a/programs/pkey/dh_server.c +++ b/programs/pkey/dh_server.c @@ -20,6 +20,7 @@ #include "mbedtls/build_info.h" #include "mbedtls/platform.h" +// md.h is included this early since MD_CAN_XXX macros are defined there. #include "mbedtls/md.h" #if defined(MBEDTLS_AES_C) && defined(MBEDTLS_DHM_C) && \ diff --git a/programs/pkey/pk_sign.c b/programs/pkey/pk_sign.c index 3335575e2..2e9b2d837 100644 --- a/programs/pkey/pk_sign.c +++ b/programs/pkey/pk_sign.c @@ -20,6 +20,7 @@ #include "mbedtls/build_info.h" #include "mbedtls/platform.h" +// md.h is included this early since MD_CAN_XXX macros are defined there. #include "mbedtls/md.h" #if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_ENTROPY_C) || \ diff --git a/programs/pkey/pk_verify.c b/programs/pkey/pk_verify.c index a6d34816b..bdeb559eb 100644 --- a/programs/pkey/pk_verify.c +++ b/programs/pkey/pk_verify.c @@ -20,6 +20,7 @@ #include "mbedtls/build_info.h" #include "mbedtls/platform.h" +// md.h is included this early since MD_CAN_XXX macros are defined there. #include "mbedtls/md.h" #if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_MD_C) || \ diff --git a/programs/pkey/rsa_sign.c b/programs/pkey/rsa_sign.c index 1308be28b..8ba3e7d1f 100644 --- a/programs/pkey/rsa_sign.c +++ b/programs/pkey/rsa_sign.c @@ -20,6 +20,7 @@ #include "mbedtls/build_info.h" #include "mbedtls/platform.h" +// md.h is included this early since MD_CAN_XXX macros are defined there. #include "mbedtls/md.h" #if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_RSA_C) || \ diff --git a/programs/pkey/rsa_sign_pss.c b/programs/pkey/rsa_sign_pss.c index 643ac47aa..fe3de0309 100644 --- a/programs/pkey/rsa_sign_pss.c +++ b/programs/pkey/rsa_sign_pss.c @@ -20,6 +20,7 @@ #include "mbedtls/build_info.h" #include "mbedtls/platform.h" +// md.h is included this early since MD_CAN_XXX macros are defined there. #include "mbedtls/md.h" #if !defined(MBEDTLS_MD_C) || !defined(MBEDTLS_ENTROPY_C) || \ diff --git a/programs/pkey/rsa_verify.c b/programs/pkey/rsa_verify.c index f65883df6..ccdf13eb4 100644 --- a/programs/pkey/rsa_verify.c +++ b/programs/pkey/rsa_verify.c @@ -20,6 +20,7 @@ #include "mbedtls/build_info.h" #include "mbedtls/platform.h" +// md.h is included this early since MD_CAN_XXX macros are defined there. #include "mbedtls/md.h" #if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_RSA_C) || \ diff --git a/programs/pkey/rsa_verify_pss.c b/programs/pkey/rsa_verify_pss.c index bc2ea64a3..d7efa6549 100644 --- a/programs/pkey/rsa_verify_pss.c +++ b/programs/pkey/rsa_verify_pss.c @@ -20,6 +20,7 @@ #include "mbedtls/build_info.h" #include "mbedtls/platform.h" +// md.h is included this early since MD_CAN_XXX macros are defined there. #include "mbedtls/md.h" #if !defined(MBEDTLS_MD_C) || !defined(MBEDTLS_ENTROPY_C) || \ diff --git a/programs/psa/key_ladder_demo.c b/programs/psa/key_ladder_demo.c index 084beb890..6059fb132 100644 --- a/programs/psa/key_ladder_demo.c +++ b/programs/psa/key_ladder_demo.c @@ -58,6 +58,7 @@ #include "mbedtls/platform.h" // for mbedtls_setbuf #include "mbedtls/platform_util.h" // for mbedtls_platform_zeroize +// md.h is included this early since MD_CAN_XXX macros are defined there. #include "mbedtls/md.h" #include diff --git a/programs/x509/cert_req.c b/programs/x509/cert_req.c index e651f3c8b..f35d62963 100644 --- a/programs/x509/cert_req.c +++ b/programs/x509/cert_req.c @@ -20,6 +20,7 @@ #include "mbedtls/build_info.h" #include "mbedtls/platform.h" +// md.h is included this early since MD_CAN_XXX macros are defined there. #include "mbedtls/md.h" #if !defined(MBEDTLS_X509_CSR_WRITE_C) || !defined(MBEDTLS_FS_IO) || \ diff --git a/programs/x509/cert_write.c b/programs/x509/cert_write.c index 9ff9488f6..5c911ca75 100644 --- a/programs/x509/cert_write.c +++ b/programs/x509/cert_write.c @@ -20,6 +20,7 @@ #include "mbedtls/build_info.h" #include "mbedtls/platform.h" +// md.h is included this early since MD_CAN_XXX macros are defined there. #include "mbedtls/md.h" #if !defined(MBEDTLS_X509_CRT_WRITE_C) || \