Skip to content
This repository was archived by the owner on Apr 24, 2019. It is now read-only.

Commit 4df5425

Browse files
author
Janne Kiiskila
committed
RSA-fix for UBLOX_EVK_ODIN_W2
UBLOX_EVK_ODIN_W2 needs the RSA with Mbed OS 5.9 onwards, there is some internal dependency which failed the linking (due to Client optimizing the RSA out). Ref. Mbed OS PR #6963
1 parent f334209 commit 4df5425

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

configs/wifi_odin_v4.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"value": "BUTTON1"
1818
}
1919
},
20-
"macros": ["MBEDTLS_USER_CONFIG_FILE=\"mbedtls_mbed_client_config.h\""],
20+
"macros": ["MBEDTLS_USER_CONFIG_FILE=\"mbedtls_mbed_client_config.h\"", "MBED_CONF_RSA_REQUIRED"],
2121
"target_overrides": {
2222
"*": {
2323
"target.features_add": ["LWIP", "COMMON_PAL"],

mbedtls_mbed_client_config.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,17 @@
7777
#define MBEDTLS_ECDSA_C
7878
#define MBEDTLS_X509_CRT_PARSE_C
7979

80-
// Remove RSA, save 20KB at total
81-
#undef MBEDTLS_RSA_C
82-
#undef MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
80+
// Remove RSA, save 20KB at total.
81+
// However, with Mbed OS 5.9 onwards - UBLOX_EVK_ODIN_W2 must have RSA!
82+
// A more abstract macro define added for that which you can trigger via
83+
// macros -part in the mbed_app.json.
84+
#if !defined(MBED_CONF_RSA_REQUIRED)
85+
#undef MBEDTLS_RSA_C
86+
#undef MBEDTLS_PK_RSA_ALT_SUPPORT
87+
#undef MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
88+
#undef MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
89+
#undef MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
90+
#endif // !MBED_CONF_RSA_REQUIRED
8391

8492
// Remove error messages, save 10KB of ROM
8593
#undef MBEDTLS_ERROR_C

0 commit comments

Comments
 (0)