Skip to content

Move the inclusion of crypto_sizes.h and crypto_struct.h in crypto.h #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ChangeLog.d/move-crypto-struct-inclusion.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bugfix
* Resolved build issue with C++ projects using TF-PSA-Crypto when compiling
with the MSVC toolset v142 and earlier. Fixes mbedtls issue #7087.
24 changes: 12 additions & 12 deletions include/psa/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ extern "C" {
* of integral types defined in "crypto_types.h". */
#include "crypto_values.h"

/* The file "crypto_sizes.h" contains definitions for size calculation
* macros whose definitions are implementation-specific. */
#include "crypto_sizes.h"

/* The file "crypto_struct.h" contains definitions for
* implementation-specific structs that are declared above. */
#if defined(MBEDTLS_PSA_CRYPTO_STRUCT_FILE)
#include MBEDTLS_PSA_CRYPTO_STRUCT_FILE
#else
#include "crypto_struct.h"
#endif

/** \defgroup initialization Library initialization
* @{
*/
Expand Down Expand Up @@ -5803,18 +5815,6 @@ psa_status_t psa_export_public_key_iop_abort(psa_export_public_key_iop_t *operat
}
#endif

/* The file "crypto_sizes.h" contains definitions for size calculation
* macros whose definitions are implementation-specific. */
#include "crypto_sizes.h"

/* The file "crypto_struct.h" contains definitions for
* implementation-specific structs that are declared above. */
#if defined(MBEDTLS_PSA_CRYPTO_STRUCT_FILE)
#include MBEDTLS_PSA_CRYPTO_STRUCT_FILE
#else
#include "crypto_struct.h"
#endif

/* The file "crypto_extra.h" contains vendor-specific definitions. This
* can include vendor-defined algorithms, extra functions, etc. */
#include "crypto_extra.h"
Expand Down