Skip to content

Commit

Permalink
[mbedtls] adjust BUILD.gn configuration for mbedTLS
Browse files Browse the repository at this point in the history
  • Loading branch information
LuDuda committed May 21, 2024
1 parent 196b271 commit 21b891e
Showing 1 changed file with 216 additions and 112 deletions.
328 changes: 216 additions & 112 deletions third_party/mbedtls/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -41,33 +41,38 @@ config("mbedtls_config") {
]

defines = [ "MBEDTLS_CONFIG_FILE=\"${mbedtls_config_file}\"" ]
cflags = [ "-Wno-conversion" ]
cflags = [
"-Wno-conversion",
"-Wno-unused-but-set-variable"
]
}

static_library("mbedtls") {
sources = [
"repo/include/mbedtls/aes.h",
"repo/include/mbedtls/aesni.h",
"repo/include/mbedtls/arc4.h",
"repo/include/mbedtls/aria.h",
"repo/include/mbedtls/asn1.h",
"repo/include/mbedtls/asn1write.h",
"repo/include/mbedtls/base64.h",
"repo/include/mbedtls/bignum.h",
"repo/include/mbedtls/blowfish.h",
"repo/include/mbedtls/bn_mul.h",
"repo/include/mbedtls/block_cipher.h",
"repo/include/mbedtls/build_info.h",
"repo/include/mbedtls/camellia.h",
"repo/include/mbedtls/ccm.h",
"repo/include/mbedtls/certs.h",
"repo/include/mbedtls/chacha20.h",
"repo/include/mbedtls/chachapoly.h",
"repo/include/mbedtls/check_config.h",
"repo/include/mbedtls/cipher.h",
"repo/include/mbedtls/cipher_internal.h",
"repo/include/mbedtls/cmac.h",
"repo/include/mbedtls/compat-1.3.h",
"repo/include/mbedtls/config.h",
"repo/include/mbedtls/compat-2.x.h",
"repo/include/mbedtls/config_adjust_legacy_crypto.h",
"repo/include/mbedtls/config_adjust_legacy_from_psa.h",
"repo/include/mbedtls/config_adjust_psa_from_legacy.h",
"repo/include/mbedtls/config_adjust_psa_superset_legacy.h",
"repo/include/mbedtls/config_adjust_ssl.h",
"repo/include/mbedtls/config_adjust_x509.h",
"repo/include/mbedtls/config_psa.h",
"repo/include/mbedtls/constant_time.h",
"repo/include/mbedtls/ctr_drbg.h",
"repo/include/mbedtls/debug.h",
"repo/include/mbedtls/des.h",
Expand All @@ -76,141 +81,240 @@ static_library("mbedtls") {
"repo/include/mbedtls/ecdsa.h",
"repo/include/mbedtls/ecjpake.h",
"repo/include/mbedtls/ecp.h",
"repo/include/mbedtls/ecp_internal.h",
"repo/include/mbedtls/entropy.h",
"repo/include/mbedtls/entropy_poll.h",
"repo/include/mbedtls/error.h",
"repo/include/mbedtls/gcm.h",
"repo/include/mbedtls/havege.h",
"repo/include/mbedtls/hkdf.h",
"repo/include/mbedtls/hmac_drbg.h",
"repo/include/mbedtls/md.h",
"repo/include/mbedtls/md2.h",
"repo/include/mbedtls/md4.h",
"repo/include/mbedtls/lms.h",
"repo/include/mbedtls/mbedtls_config.h",
"repo/include/mbedtls/md5.h",
"repo/include/mbedtls/md_internal.h",
"repo/include/mbedtls/md.h",
"repo/include/mbedtls/memory_buffer_alloc.h",
"repo/include/mbedtls/net.h",
"repo/include/mbedtls/net_sockets.h",
"repo/include/mbedtls/nist_kw.h",
"repo/include/mbedtls/oid.h",
"repo/include/mbedtls/padlock.h",
"repo/include/mbedtls/pem.h",
"repo/include/mbedtls/pk.h",
"repo/include/mbedtls/pk_internal.h",
"repo/include/mbedtls/pkcs11.h",
"repo/include/mbedtls/pkcs12.h",
"repo/include/mbedtls/pkcs5.h",
"repo/include/mbedtls/pkcs7.h",
"repo/include/mbedtls/pk.h",
"repo/include/mbedtls/platform.h",
"repo/include/mbedtls/platform_time.h",
"repo/include/mbedtls/platform_util.h",
"repo/include/mbedtls/poly1305.h",
"repo/include/mbedtls/private_access.h",
"repo/include/mbedtls/psa_util.h",
"repo/include/mbedtls/ripemd160.h",
"repo/include/mbedtls/rsa.h",
"repo/include/mbedtls/rsa_internal.h",
"repo/include/mbedtls/sha1.h",
"repo/include/mbedtls/sha256.h",
"repo/include/mbedtls/sha3.h",
"repo/include/mbedtls/sha512.h",
"repo/include/mbedtls/ssl.h",
"repo/include/mbedtls/ssl_cache.h",
"repo/include/mbedtls/ssl_ciphersuites.h",
"repo/include/mbedtls/ssl_cookie.h",
"repo/include/mbedtls/ssl_internal.h",
"repo/include/mbedtls/ssl.h",
"repo/include/mbedtls/ssl_ticket.h",
"repo/include/mbedtls/threading.h",
"repo/include/mbedtls/timing.h",
"repo/include/mbedtls/version.h",
"repo/include/mbedtls/x509.h",
"repo/include/mbedtls/x509_crl.h",
"repo/include/mbedtls/x509_crt.h",
"repo/include/mbedtls/x509_csr.h",
"repo/include/mbedtls/xtea.h",
"repo/library/aes.c",
"repo/library/aesni.c",
"repo/library/arc4.c",
"repo/library/aria.c",
"repo/library/asn1parse.c",
"repo/library/asn1write.c",
"repo/library/base64.c",
"repo/library/bignum.c",
"repo/library/blowfish.c",
"repo/library/camellia.c",
"repo/library/ccm.c",
"repo/library/certs.c",
"repo/library/chacha20.c",
"repo/library/chachapoly.c",
"repo/library/cipher.c",
"repo/library/cipher_wrap.c",
"repo/library/cmac.c",
"repo/library/ctr_drbg.c",
"repo/library/debug.c",
"repo/library/des.c",
"repo/library/dhm.c",
"repo/library/ecdh.c",
"repo/library/ecdsa.c",
"repo/library/ecjpake.c",
"repo/library/ecp.c",
"repo/library/ecp_curves.c",
"repo/library/entropy.c",
"repo/library/entropy_poll.c",
"repo/library/error.c",
"repo/library/gcm.c",
"repo/library/havege.c",
"repo/library/hkdf.c",
"repo/library/hmac_drbg.c",
"repo/library/md.c",
"repo/library/md2.c",
"repo/library/md4.c",
"repo/library/md5.c",
"repo/library/memory_buffer_alloc.c",
"repo/library/net_sockets.c",
"repo/library/nist_kw.c",
"repo/library/oid.c",
"repo/library/padlock.c",
"repo/library/pem.c",
"repo/library/pk.c",
"repo/library/pk_wrap.c",
"repo/library/pkcs11.c",
"repo/library/pkcs12.c",
"repo/library/pkcs5.c",
"repo/library/pkparse.c",
"repo/library/pkwrite.c",
"repo/library/platform.c",
"repo/library/platform_util.c",
"repo/library/poly1305.c",
"repo/library/psa_crypto.c",
"repo/library/psa_crypto_driver_wrappers.c",
"repo/library/psa_crypto_se.c",
"repo/library/psa_crypto_slot_management.c",
"repo/library/psa_crypto_storage.c",
"repo/library/psa_its_file.c",
"repo/library/ripemd160.c",
"repo/library/rsa.c",
"repo/library/rsa_internal.c",
"repo/library/sha1.c",
"repo/library/sha256.c",
"repo/library/sha512.c",
"repo/library/ssl_cache.c",
"repo/library/ssl_ciphersuites.c",
"repo/library/ssl_cli.c",
"repo/library/ssl_cookie.c",
"repo/library/ssl_msg.c",
"repo/library/ssl_srv.c",
"repo/library/ssl_ticket.c",
"repo/library/ssl_tls.c",
"repo/library/ssl_tls13_keys.c",
"repo/library/threading.c",
"repo/library/timing.c",
"repo/library/version.c",
"repo/library/version_features.c",
"repo/library/x509.c",
"repo/library/x509_create.c",
"repo/library/x509_crl.c",
"repo/library/x509_crt.c",
"repo/library/x509_csr.c",
"repo/library/x509write_crt.c",
"repo/library/x509write_csr.c",
"repo/library/xtea.c",
"repo/include/mbedtls/x509.h",
"repo/include/psa/build_info.h",
"repo/include/psa/crypto_adjust_auto_enabled.h",
"repo/include/psa/crypto_adjust_config_key_pair_types.h",
"repo/include/psa/crypto_adjust_config_synonyms.h",
"repo/include/psa/crypto_builtin_composites.h",
"repo/include/psa/crypto_builtin_key_derivation.h",
"repo/include/psa/crypto_builtin_primitives.h",
"repo/include/psa/crypto_compat.h",
"repo/include/psa/crypto_config.h",
"repo/include/psa/crypto_driver_common.h",
"repo/include/psa/crypto_driver_contexts_composites.h",
"repo/include/psa/crypto_driver_contexts_key_derivation.h",
"repo/include/psa/crypto_driver_contexts_primitives.h",
"repo/include/psa/crypto_extra.h",
"repo/include/psa/crypto.h",
"repo/include/psa/crypto_legacy.h",
"repo/include/psa/crypto_platform.h",
"repo/include/psa/crypto_se_driver.h",
"repo/include/psa/crypto_sizes.h",
"repo/include/psa/crypto_struct.h",
"repo/include/psa/crypto_types.h",
"repo/include/psa/crypto_values.h",
"repo/library/library/aes.c",
"repo/library/library/aesce.c",
"repo/library/library/aesce.h",
"repo/library/library/aesni.c",
"repo/library/library/aesni.h",
"repo/library/library/alignment.h",
"repo/library/library/aria.c",
"repo/library/library/asn1parse.c",
"repo/library/library/asn1write.c",
"repo/library/library/base64.c",
"repo/library/library/base64_internal.h",
"repo/library/library/bignum.c",
"repo/library/library/bignum_core.c",
"repo/library/library/bignum_core.h",
"repo/library/library/bignum_mod.c",
"repo/library/library/bignum_mod.h",
"repo/library/library/bignum_mod_raw.c",
"repo/library/library/bignum_mod_raw.h",
"repo/library/library/bignum_mod_raw_invasive.h",
"repo/library/library/block_cipher.c",
"repo/library/library/block_cipher_internal.h",
"repo/library/library/bn_mul.h",
"repo/library/library/camellia.c",
"repo/library/library/ccm.c",
"repo/library/library/chacha20.c",
"repo/library/library/chachapoly.c",
"repo/library/library/check_crypto_config.h",
"repo/library/library/cipher.c",
"repo/library/library/cipher_wrap.c",
"repo/library/library/cipher_wrap.h",
"repo/library/library/cmac.c",
"repo/library/library/CMakeLists.txt",
"repo/library/library/common.h",
"repo/library/library/constant_time.c",
"repo/library/library/constant_time_impl.h",
"repo/library/library/constant_time_internal.h",
"repo/library/library/ctr_drbg.c",
"repo/library/library/ctr.h",
"repo/library/library/debug.c",
"repo/library/library/debug_internal.h",
"repo/library/library/des.c",
"repo/library/library/dhm.c",
"repo/library/library/ecdh.c",
"repo/library/library/ecdsa.c",
"repo/library/library/ecjpake.c",
"repo/library/library/ecp.c",
"repo/library/library/ecp_curves.c",
"repo/library/library/ecp_curves_new.c",
"repo/library/library/ecp_internal_alt.h",
"repo/library/library/ecp_invasive.h",
"repo/library/library/entropy.c",
"repo/library/library/entropy_poll.c",
"repo/library/library/entropy_poll.h",
"repo/library/library/error.c",
"repo/library/library/gcm.c",
"repo/library/library/.gitignore",
"repo/library/library/hkdf.c",
"repo/library/library/hmac_drbg.c",
"repo/library/library/lmots.c",
"repo/library/library/lmots.h",
"repo/library/library/lms.c",
"repo/library/library/Makefile",
"repo/library/library/md5.c",
"repo/library/library/md.c",
"repo/library/library/md_psa.h",
"repo/library/library/md_wrap.h",
"repo/library/library/memory_buffer_alloc.c",
"repo/library/library/mps_common.h",
"repo/library/library/mps_error.h",
"repo/library/library/mps_reader.c",
"repo/library/library/mps_reader.h",
"repo/library/library/mps_trace.c",
"repo/library/library/mps_trace.h",
"repo/library/library/net_sockets.c",
"repo/library/library/nist_kw.c",
"repo/library/library/oid.c",
"repo/library/library/padlock.c",
"repo/library/library/padlock.h",
"repo/library/library/pem.c",
"repo/library/library/pk.c",
"repo/library/library/pkcs12.c",
"repo/library/library/pkcs5.c",
"repo/library/library/pkcs7.c",
"repo/library/library/pk_ecc.c",
"repo/library/library/pk_internal.h",
"repo/library/library/pkparse.c",
"repo/library/library/pk_wrap.c",
"repo/library/library/pk_wrap.h",
"repo/library/library/pkwrite.c",
"repo/library/library/pkwrite.h",
"repo/library/library/platform.c",
"repo/library/library/platform_util.c",
"repo/library/library/poly1305.c",
"repo/library/library/psa_crypto_aead.c",
"repo/library/library/psa_crypto_aead.h",
"repo/library/library/psa_crypto.c",
"repo/library/library/psa_crypto_cipher.c",
"repo/library/library/psa_crypto_cipher.h",
"repo/library/library/psa_crypto_client.c",
"repo/library/library/psa_crypto_core_common.h",
"repo/library/library/psa_crypto_core.h",
"repo/library/library/psa_crypto_driver_wrappers.h",
"repo/library/library/psa_crypto_driver_wrappers_no_static.c",
"repo/library/library/psa_crypto_driver_wrappers_no_static.h",
"repo/library/library/psa_crypto_ecp.c",
"repo/library/library/psa_crypto_ecp.h",
"repo/library/library/psa_crypto_ffdh.c",
"repo/library/library/psa_crypto_ffdh.h",
"repo/library/library/psa_crypto_hash.c",
"repo/library/library/psa_crypto_hash.h",
"repo/library/library/psa_crypto_invasive.h",
"repo/library/library/psa_crypto_its.h",
"repo/library/library/psa_crypto_mac.c",
"repo/library/library/psa_crypto_mac.h",
"repo/library/library/psa_crypto_pake.c",
"repo/library/library/psa_crypto_pake.h",
"repo/library/library/psa_crypto_random_impl.h",
"repo/library/library/psa_crypto_rsa.c",
"repo/library/library/psa_crypto_rsa.h",
"repo/library/library/psa_crypto_se.c",
"repo/library/library/psa_crypto_se.h",
"repo/library/library/psa_crypto_slot_management.c",
"repo/library/library/psa_crypto_slot_management.h",
"repo/library/library/psa_crypto_storage.c",
"repo/library/library/psa_crypto_storage.h",
"repo/library/library/psa_its_file.c",
"repo/library/library/psa_util.c",
"repo/library/library/psa_util_internal.h",
"repo/library/library/ripemd160.c",
"repo/library/library/rsa_alt_helpers.c",
"repo/library/library/rsa_alt_helpers.h",
"repo/library/library/rsa.c",
"repo/library/library/rsa_internal.h",
"repo/library/library/sha1.c",
"repo/library/library/sha256.c",
"repo/library/library/sha3.c",
"repo/library/library/sha512.c",
"repo/library/library/ssl_cache.c",
"repo/library/library/ssl_ciphersuites.c",
"repo/library/library/ssl_ciphersuites_internal.h",
"repo/library/library/ssl_client.c",
"repo/library/library/ssl_client.h",
"repo/library/library/ssl_cookie.c",
"repo/library/library/ssl_debug_helpers_generated.c",
"repo/library/library/ssl_debug_helpers.h",
"repo/library/library/ssl_misc.h",
"repo/library/library/ssl_msg.c",
"repo/library/library/ssl_ticket.c",
"repo/library/library/ssl_tls12_client.c",
"repo/library/library/ssl_tls12_server.c",
"repo/library/library/ssl_tls13_client.c",
"repo/library/library/ssl_tls13_generic.c",
"repo/library/library/ssl_tls13_invasive.h",
"repo/library/library/ssl_tls13_keys.c",
"repo/library/library/ssl_tls13_keys.h",
"repo/library/library/ssl_tls13_server.c",
"repo/library/library/ssl_tls.c",
"repo/library/library/threading.c",
"repo/library/library/timing.c",
"repo/library/library/version.c",
"repo/library/library/version_features.c",
"repo/library/library/x509.c",
"repo/library/library/x509_create.c",
"repo/library/library/x509_crl.c",
"repo/library/library/x509_crt.c",
"repo/library/library/x509_csr.c",
"repo/library/library/x509_internal.h",
"repo/library/library/x509write.c",
"repo/library/library/x509write_crt.c",
"repo/library/library/x509write_csr.c"
]

public_deps = mbedtls_deps
Expand Down

0 comments on commit 21b891e

Please sign in to comment.