Skip to content

Commit 23a0d48

Browse files
Merge pull request #10196 from ronald-cron-arm/move-crypto-struct-inclusion
[Backport 3.6] Move the inclusion of crypto_sizes.h and crypto_struct.h in crypto.h
2 parents 1173786 + 4960825 commit 23a0d48

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Bugfix
2+
* Resolved build issue with C++ projects using TF-PSA-Crypto when compiling
3+
with the MSVC toolset v142 and earlier. Fixes mbedtls issue #7087.

include/psa/crypto.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,18 @@ extern "C" {
5959
* of integral types defined in "crypto_types.h". */
6060
#include "crypto_values.h"
6161

62+
/* The file "crypto_sizes.h" contains definitions for size calculation
63+
* macros whose definitions are implementation-specific. */
64+
#include "crypto_sizes.h"
65+
66+
/* The file "crypto_struct.h" contains definitions for
67+
* implementation-specific structs that are declared above. */
68+
#if defined(MBEDTLS_PSA_CRYPTO_STRUCT_FILE)
69+
#include MBEDTLS_PSA_CRYPTO_STRUCT_FILE
70+
#else
71+
#include "crypto_struct.h"
72+
#endif
73+
6274
/** \defgroup initialization Library initialization
6375
* @{
6476
*/
@@ -4958,18 +4970,6 @@ psa_status_t psa_verify_hash_abort(
49584970
}
49594971
#endif
49604972

4961-
/* The file "crypto_sizes.h" contains definitions for size calculation
4962-
* macros whose definitions are implementation-specific. */
4963-
#include "crypto_sizes.h"
4964-
4965-
/* The file "crypto_struct.h" contains definitions for
4966-
* implementation-specific structs that are declared above. */
4967-
#if defined(MBEDTLS_PSA_CRYPTO_STRUCT_FILE)
4968-
#include MBEDTLS_PSA_CRYPTO_STRUCT_FILE
4969-
#else
4970-
#include "crypto_struct.h"
4971-
#endif
4972-
49734973
/* The file "crypto_extra.h" contains vendor-specific definitions. This
49744974
* can include vendor-defined algorithms, extra functions, etc. */
49754975
#include "crypto_extra.h"

0 commit comments

Comments
 (0)