From 70f7ff3db5e3146eba21defa8b2e01990ac87a3b Mon Sep 17 00:00:00 2001 From: Andrea Pappacoda Date: Fri, 22 Jul 2022 17:42:50 +0200 Subject: [PATCH] build(externals): move to MbedTLS upstream 2.28.1 The latest LTS release now includes the changes of the yuzu-emu fork, so we can now directly use the upstream version instead. --- .gitmodules | 2 +- externals/CMakeLists.txt | 9 +++++++++ externals/mbedtls | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 8e98ee9cb3..34fe6fe801 100644 --- a/.gitmodules +++ b/.gitmodules @@ -30,7 +30,7 @@ url = https://github.com/yuzu-emu/sirit [submodule "mbedtls"] path = externals/mbedtls - url = https://github.com/yuzu-emu/mbedtls + url = https://github.com/Mbed-TLS/mbedtls [submodule "xbyak"] path = externals/xbyak url = https://github.com/herumi/xbyak.git diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 0a4a7488fe..0b85d73d28 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -34,6 +34,15 @@ endif() find_package(MbedTLS 2.16) if(NOT MbedTLS_FOUND) message(STATUS "MbedTLS not found, falling back to externals") + + set(ENABLE_PROGRAMS OFF CACHE BOOL "") + set(ENABLE_TESTING OFF CACHE BOOL "") + + # Edit MbedTLS config header to enable CMAC + file(READ "./mbedtls/include/mbedtls/config.h" MbedTLS_CONFIG_FILE) + string(REPLACE "//#define MBEDTLS_CMAC_C" "#define MBEDTLS_CMAC_C" MbedTLS_CONFIG_FILE_CMAC "${MbedTLS_CONFIG_FILE}") + file(WRITE "./mbedtls/include/mbedtls/config.h" "${MbedTLS_CONFIG_FILE_CMAC}") + add_subdirectory(mbedtls EXCLUDE_FROM_ALL) target_include_directories(mbedcrypto PUBLIC ./mbedtls/include) add_library(MbedTLS::mbedcrypto ALIAS mbedcrypto) diff --git a/externals/mbedtls b/externals/mbedtls index 8c88150ca1..dd79db1001 160000 --- a/externals/mbedtls +++ b/externals/mbedtls @@ -1 +1 @@ -Subproject commit 8c88150ca139e06aa2aae8349df8292a88148ea1 +Subproject commit dd79db10014d85b26d11fe57218431f2e5ede6f2