You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have encountered two compilation issues for version v3.6.0 using the OT build system with the -wpedantic flag.
In file included from third_party/mbedtls/repo/include/psa/crypto.h:4828,
from third_party/mbedtls/repo/include/mbedtls/pk.h:32,
from third_party/mbedtls/repo/include/mbedtls/ssl_ciphersuites.h:16,
from third_party/mbedtls/repo/include/mbedtls/ssl.h:20,
[...]
third_party/mbedtls/repo/include/psa/crypto_struct.h:229:13: error: ISO C++ forbids flexible array member ‘data’ [-Wpedantic]
229 | uint8_t data[];
and
third_party/mbedtls/repo/library/pk.c: In function ‘copy_from_psa’:
third_party/mbedtls/repo/library/pk.c:871:21: warning: variable ‘alg_type’ set but not used [-Wunused-but-set-variable]
871 | psa_algorithm_t alg_type;
For the first issue, I plan to apply a workaround, but I believe it might be better to implement variable-length structures differently (e.g., using *data or data[1] with an adjusted allocation scheme). Therefore, I will keep this GitHub issue open. @gilles-peskine-arm any thoughts here?
I intended to fix the second issue by myself, but I noticed that it has already been resolved in the development branch (#9067) - great!
The text was updated successfully, but these errors were encountered:
For the flexible array member, we're already tracking this in #9020. We're going to make new types and functions that split the variable-length part out of the structure and into a separate parameter. The current type and function will be skipped if defined(__cplusplus) (exact condition TBD).
For the unused-variable warnings in copy_from_psa, we already have some fixes in the development branch (390f276 and dde67bb). I'm not sure we've fixed all cases, but we have fixed the one you encountered.
Summary
I'm working on migrating from the legacy MbedTLS crypto API to the PSA API for the OpenThread project, as requested by @gilles-peskine-arm (openthread/openthread#10253).
I have encountered two compilation issues for version v3.6.0 using the OT build system with the -wpedantic flag.
and
For the first issue, I plan to apply a workaround, but I believe it might be better to implement variable-length structures differently (e.g., using *data or data[1] with an adjusted allocation scheme). Therefore, I will keep this GitHub issue open. @gilles-peskine-arm any thoughts here?
I intended to fix the second issue by myself, but I noticed that it has already been resolved in the development branch (#9067) - great!
The text was updated successfully, but these errors were encountered: