Compilation error when using example configuration crypto-config-ccm-aes-sha256.h #822

Open
opened 2026-06-24 02:10:20 -05:00 by meyertom · 0 comments
meyertom commented 2026-06-24 02:10:20 -05:00 (Migrated from github.com)

Summary

Compilation problem on windows using the provided config file "crypto-config-ccm-aes-sha256.h"

mbedtls/pk.h failes to compile with the following error:

C2229: struct 'mbedtls_pk_context' has an illegal zero-sized array"

which is due to neither "PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY" nor "PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY" being defined.

Solution is to define either one of the aforementionend defines.

The problem should also arise with other compilers, but I have not ifurther nverstigated the issue.

System information

TF-PSA-Crypto version (number or commit id): 1.1.0
Operating system and version: Windows 11 25H2
Configuration (if not default, please attach crypto_config.h): crypto-config-ccm-aes-sha256.h
Compiler and options (if you used a pre-built binary, please indicate how you obtained it): Visual Studio 2026
Additional environment information:

Expected behavior

Should compile, i cannot say whether the header pk.h should be used at all with the settings used for this compile.

Actual behavior

compilation error

Steps to reproduce

normal cmake build on windows

Additional information

### Summary Compilation problem on windows using the provided config file "crypto-config-ccm-aes-sha256.h" mbedtls/pk.h failes to compile with the following error: C2229: struct 'mbedtls_pk_context' has an illegal zero-sized array" which is due to neither "PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY" nor "PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY" being defined. Solution is to define either one of the aforementionend defines. The problem should also arise with other compilers, but I have not ifurther nverstigated the issue. ### System information TF-PSA-Crypto version (number or commit id): 1.1.0 Operating system and version: Windows 11 25H2 Configuration (if not default, please attach `crypto_config.h`): crypto-config-ccm-aes-sha256.h Compiler and options (if you used a pre-built binary, please indicate how you obtained it): Visual Studio 2026 Additional environment information: ### Expected behavior Should compile, i cannot say whether the header pk.h should be used at all with the settings used for this compile. ### Actual behavior compilation error ### Steps to reproduce normal cmake build on windows ### Additional information
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Mbed-TLS/TF-PSA-Crypto#822
No description provided.