Skip to content

Commit c6048c8

Browse files
samples: siwx91x_ota: fix build error to align with latest mbedtls
Update the project configuration (mbedTLS options in prj.conf) so the sample builds with current Zephyr and satisfies mbedtls/check_config.h when RSA key exchange is enabled. Disable MBEDTLS_USE_PSA_CRYPTO for TLS so legacy AES/GCM paths provide MBEDTLS_SSL_HAVE_*; with PSA-for-TLS and no PSA AES wants, the client could advertise no usable cipher suites. Enable cipher and hash sets plus RSA key exchange with the required MD_C, RSA_C, PKCS1, and ASN1 parse options. Use sl_wifi_firmware_header_t for firmware header size instead of the deprecated sl_si91x_firmware_header_t (WiseConnect 4.0). Signed-off-by: Swamidas Nampalli <Swami.Das@silabs.com>
1 parent bbfc459 commit c6048c8

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

samples/siwx91x_ota/prj.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=4096
3030
CONFIG_MBEDTLS_TLS_VERSION_1_2=y
3131
CONFIG_MBEDTLS_CIPHER_ALL_ENABLED=y
3232
CONFIG_MBEDTLS_HASH_ALL_ENABLED=y
33+
CONFIG_MBEDTLS_USE_PSA_CRYPTO=n
34+
CONFIG_PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_IMPORT=y
35+
CONFIG_MBEDTLS_MD_C=y
36+
CONFIG_MBEDTLS_RSA_C=y
37+
CONFIG_MBEDTLS_PKCS1_V15=y
38+
CONFIG_MBEDTLS_PKCS1_V21=y
39+
CONFIG_MBEDTLS_ASN1_PARSE_C=y
40+
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_ENABLED=y
3341

3442
CONFIG_ASSERT=y
3543

samples/siwx91x_ota/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ static int ota_load_firmware(struct app_ctx *ctx)
421421
__ASSERT(ctx->flash_buffer_len > 0, "No firmware data to process");
422422

423423
if (ctx->range_start == 0) {
424-
buf_offset = sizeof(sl_si91x_firmware_header_t);
424+
buf_offset = sizeof(sl_wifi_firmware_header_t);
425425
status = sl_wifi_get_firmware_size(ctx->flash_buffer, &ota_calc_image_size);
426426
if (status != SL_STATUS_OK) {
427427
printf("Unable to fetch firmware size. Status: 0x%08x\n", status);

0 commit comments

Comments
 (0)