Skip to content

Commit

Permalink
Update mbedTLS to 3.2.1 for PSA crypto API testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian-Nordic committed Oct 14, 2022
1 parent 7089e85 commit 1e9201d
Show file tree
Hide file tree
Showing 4 changed files with 2,498 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/lib/core/CHIPConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
*
*/
#ifndef CHIP_CONFIG_SHA256_CONTEXT_SIZE
#define CHIP_CONFIG_SHA256_CONTEXT_SIZE ((sizeof(unsigned int) * (8 + 2 + 16 + 2)) + sizeof(uint64_t))
#define CHIP_CONFIG_SHA256_CONTEXT_SIZE 256
#endif // CHIP_CONFIG_SHA256_CONTEXT_SIZE

/**
Expand Down
41 changes: 25 additions & 16 deletions third_party/mbedtls/mbedtls.gni
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ template("mbedtls_target") {
}

config("${mbedtls_target_name}_config") {
include_dirs = [ "${_mbedtls_root}/include" ]
include_dirs = [
"${_mbedtls_root}/include",
"${_mbedtls_root}/library"
]
}

static_library(mbedtls_target_name) {
Expand All @@ -42,16 +45,13 @@ template("mbedtls_target") {
sources += [
"${_mbedtls_root}/library/aes.c",
"${_mbedtls_root}/library/aesni.c",
"${_mbedtls_root}/library/arc4.c",
"${_mbedtls_root}/library/aria.c",
"${_mbedtls_root}/library/asn1parse.c",
"${_mbedtls_root}/library/asn1write.c",
"${_mbedtls_root}/library/base64.c",
"${_mbedtls_root}/library/bignum.c",
"${_mbedtls_root}/library/blowfish.c",
"${_mbedtls_root}/library/camellia.c",
"${_mbedtls_root}/library/ccm.c",
"${_mbedtls_root}/library/certs.c",
"${_mbedtls_root}/library/chacha20.c",
"${_mbedtls_root}/library/chachapoly.c",
"${_mbedtls_root}/library/cipher.c",
Expand All @@ -71,50 +71,59 @@ template("mbedtls_target") {
"${_mbedtls_root}/library/entropy_poll.c",
"${_mbedtls_root}/library/error.c",
"${_mbedtls_root}/library/gcm.c",
"${_mbedtls_root}/library/havege.c",
"${_mbedtls_root}/library/hkdf.c",
"${_mbedtls_root}/library/hmac_drbg.c",
"${_mbedtls_root}/library/md.c",
"${_mbedtls_root}/library/md2.c",
"${_mbedtls_root}/library/md4.c",
"${_mbedtls_root}/library/md5.c",
"${_mbedtls_root}/library/md.c",
"${_mbedtls_root}/library/memory_buffer_alloc.c",
"${_mbedtls_root}/library/mps_reader.c",
"${_mbedtls_root}/library/mps_trace.c",
"${_mbedtls_root}/library/net_sockets.c",
"${_mbedtls_root}/library/nist_kw.c",
"${_mbedtls_root}/library/oid.c",
"${_mbedtls_root}/library/padlock.c",
"${_mbedtls_root}/library/pem.c",
"${_mbedtls_root}/library/pk.c",
"${_mbedtls_root}/library/pk_wrap.c",
"${_mbedtls_root}/library/pkcs11.c",
"${_mbedtls_root}/library/pkcs12.c",
"${_mbedtls_root}/library/pkcs5.c",
"${_mbedtls_root}/library/pkparse.c",
"${_mbedtls_root}/library/pk_wrap.c",
"${_mbedtls_root}/library/pkwrite.c",
"${_mbedtls_root}/library/platform.c",
"${_mbedtls_root}/library/platform_util.c",
"${_mbedtls_root}/library/poly1305.c",
"${_mbedtls_root}/library/psa_crypto_aead.c",
"${_mbedtls_root}/library/psa_crypto.c",
"${_mbedtls_root}/library/psa_crypto_driver_wrappers.c",
"${_mbedtls_root}/library/psa_crypto_cipher.c",
"${_mbedtls_root}/library/psa_crypto_client.c",
"${_mbedtls_root}/library/psa_crypto_ecp.c",
"${_mbedtls_root}/library/psa_crypto_hash.c",
"${_mbedtls_root}/library/psa_crypto_mac.c",
"${_mbedtls_root}/library/psa_crypto_rsa.c",
"${_mbedtls_root}/library/psa_crypto_se.c",
"${_mbedtls_root}/library/psa_crypto_slot_management.c",
"${_mbedtls_root}/library/psa_crypto_storage.c",
"${_mbedtls_root}/library/psa_its_file.c",
"${_mbedtls_root}/library/ripemd160.c",
"${_mbedtls_root}/library/rsa_alt_helpers.c",
"${_mbedtls_root}/library/rsa.c",
"${_mbedtls_root}/library/rsa_internal.c",
"${_mbedtls_root}/library/sha1.c",
"${_mbedtls_root}/library/sha256.c",
"${_mbedtls_root}/library/sha512.c",
"${_mbedtls_root}/library/ssl_cache.c",
"${_mbedtls_root}/library/ssl_ciphersuites.c",
"${_mbedtls_root}/library/ssl_cli.c",
"${_mbedtls_root}/library/ssl_client.c",
"${_mbedtls_root}/library/ssl_cookie.c",
"${_mbedtls_root}/library/ssl_debug_helpers_generated.c",
"${_mbedtls_root}/library/ssl_msg.c",
"${_mbedtls_root}/library/ssl_srv.c",
"${_mbedtls_root}/library/ssl_ticket.c",
"${_mbedtls_root}/library/ssl_tls.c",
"${_mbedtls_root}/library/ssl_tls12_client.c",
"${_mbedtls_root}/library/ssl_tls12_server.c",
"${_mbedtls_root}/library/ssl_tls13_client.c",
"${_mbedtls_root}/library/ssl_tls13_generic.c",
"${_mbedtls_root}/library/ssl_tls13_keys.c",
"${_mbedtls_root}/library/ssl_tls13_server.c",
"${_mbedtls_root}/library/ssl_tls.c",
"${_mbedtls_root}/library/threading.c",
"${_mbedtls_root}/library/timing.c",
"${_mbedtls_root}/library/version.c",
Expand All @@ -126,7 +135,7 @@ template("mbedtls_target") {
"${_mbedtls_root}/library/x509_csr.c",
"${_mbedtls_root}/library/x509write_crt.c",
"${_mbedtls_root}/library/x509write_csr.c",
"${_mbedtls_root}/library/xtea.c",
"${mbedtls_repo}/psa_crypto_driver_wrappers.c",
]

if (!defined(configs)) {
Expand Down
Loading

0 comments on commit 1e9201d

Please sign in to comment.