Skip to content

Commit 037a7ac

Browse files
Move the inclusion of crypto_sizes.h and crypto_struct.h in crypto.h
That way when API are declared, the types they used are defined. This should resolve the issues related to psa_xyz_init functions returning a structure described in #7087. Signed-off-by: Ronald Cron <[email protected]>
1 parent 08e776d commit 037a7ac

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

include/psa/crypto.h

+12-12
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@ extern "C" {
3939
* algorithms, key types, policies, etc. */
4040
#include "crypto_types.h"
4141

42+
/* The file "crypto_sizes.h" contains definitions for size calculation
43+
* macros whose definitions are implementation-specific. */
44+
#include "crypto_sizes.h"
45+
46+
/* The file "crypto_struct.h" contains definitions for
47+
* implementation-specific structs that are declared above. */
48+
#if defined(MBEDTLS_PSA_CRYPTO_STRUCT_FILE)
49+
#include MBEDTLS_PSA_CRYPTO_STRUCT_FILE
50+
#else
51+
#include "crypto_struct.h"
52+
#endif
53+
4254
/** \defgroup version API version
4355
* @{
4456
*/
@@ -5803,18 +5815,6 @@ psa_status_t psa_export_public_key_iop_abort(psa_export_public_key_iop_t *operat
58035815
}
58045816
#endif
58055817

5806-
/* The file "crypto_sizes.h" contains definitions for size calculation
5807-
* macros whose definitions are implementation-specific. */
5808-
#include "crypto_sizes.h"
5809-
5810-
/* The file "crypto_struct.h" contains definitions for
5811-
* implementation-specific structs that are declared above. */
5812-
#if defined(MBEDTLS_PSA_CRYPTO_STRUCT_FILE)
5813-
#include MBEDTLS_PSA_CRYPTO_STRUCT_FILE
5814-
#else
5815-
#include "crypto_struct.h"
5816-
#endif
5817-
58185818
/* The file "crypto_extra.h" contains vendor-specific definitions. This
58195819
* can include vendor-defined algorithms, extra functions, etc. */
58205820
#include "crypto_extra.h"

0 commit comments

Comments
 (0)