Skip to content

Commit fc6263d

Browse files
committed
sim: Updates for mbedtls >= 3.1
There are a few minor changes to configuration and what files are needed to support newer version of Mbed TLS. Signed-off-by: David Brown <[email protected]>
1 parent 0a78f56 commit fc6263d

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

sim/mcuboot-sys/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,14 @@ fn main() {
131131
conf.file("../../ext/mbedtls/library/psa_crypto.c");
132132
conf.file("../../ext/mbedtls/library/psa_crypto_cipher.c");
133133
conf.file("../../ext/mbedtls/library/psa_crypto_client.c");
134-
conf.file("../../ext/mbedtls/library/psa_crypto_driver_wrappers.c");
135134
conf.file("../../ext/mbedtls/library/psa_crypto_ecp.c");
136135
conf.file("../../ext/mbedtls/library/psa_crypto_hash.c");
137136
conf.file("../../ext/mbedtls/library/psa_crypto_mac.c");
138137
conf.file("../../ext/mbedtls/library/psa_crypto_rsa.c");
139138
conf.file("../../ext/mbedtls/library/psa_crypto_slot_management.c");
140139
conf.file("../../ext/mbedtls/library/psa_crypto_storage.c");
141140
conf.file("../../ext/mbedtls/library/psa_its_file.c");
141+
conf.file("../../ext/mbedtls/library/psa_util.c");
142142
conf.file("../../ext/mbedtls/library/ripemd160.c");
143143
conf.file("../../ext/mbedtls/library/rsa_alt_helpers.c");
144144
conf.file("../../ext/mbedtls/library/sha1.c");

sim/mcuboot-sys/csupport/config-ec-psa.h

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#define MBEDTLS_BIGNUM_C
2323
#define MBEDTLS_MD_C
2424
#define MBEDTLS_OID_C
25+
#define MBEDTLS_CIPHER_C
2526
#if defined(MCUBOOT_SIGN_EC384)
2627
#define MBEDTLS_SHA384_C
2728
#define MBEDTLS_SHA512_C

sim/mcuboot-sys/csupport/config-rsa-kw.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363

6464
/* mbed TLS modules */
6565
#define MBEDTLS_ASN1_PARSE_C
66+
#define MBEDTLS_ASN1_WRITE_C
6667
#define MBEDTLS_BIGNUM_C
6768
#define MBEDTLS_MD_C
6869
#define MBEDTLS_OID_C
@@ -72,10 +73,6 @@
7273
#define MBEDTLS_CIPHER_C
7374
#define MBEDTLS_NIST_KW_C
7475

75-
/* Save RAM by adjusting to our exact needs */
76-
#define MBEDTLS_ECP_MAX_BITS 2048
77-
#define MBEDTLS_MPI_MAX_SIZE 256
78-
7976
#define MBEDTLS_SSL_MAX_CONTENT_LEN 1024
8077

8178
/* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */

0 commit comments

Comments
 (0)