Update Mbed TLS to 3.6.0

Update Mbed TLS external component to 3.6.0 and align the custom patch
with the new version.

Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: If16a73751e716a1e70fa5302ecc8513e6f0fc4f8
diff --git a/external/MbedTLS/0001-Add-capability-to-selectively-build-libraries.patch b/external/MbedTLS/0001-Add-capability-to-selectively-build-libraries.patch
index 2f31613..32ba59f 100644
--- a/external/MbedTLS/0001-Add-capability-to-selectively-build-libraries.patch
+++ b/external/MbedTLS/0001-Add-capability-to-selectively-build-libraries.patch
@@ -1,7 +1,7 @@
-From ee65a0f8164db4531d35aa40db7b2f066cd333d7 Mon Sep 17 00:00:00 2001
+From 009b346144f4efd6c7f6ca0ceaead89e7333bba7 Mon Sep 17 00:00:00 2001
 From: Gyorgy Szing <Gyorgy.Szing@arm.com>
 Date: Tue, 28 Mar 2023 18:20:44 +0200
-Subject: [PATCH 1/1] Add capability to selectively build libraries
+Subject: [PATCH] Add capability to selectively build libraries
 
 Introduce the BUILD_X509 and BUILD_TLS options which allows disabling
 or enabling building of these libraries.
@@ -17,7 +17,7 @@
  1 file changed, 57 insertions(+), 20 deletions(-)
 
 diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
-index eeda06aee..d79c657fd 100644
+index e6705de55..3244bd086 100644
 --- a/library/CMakeLists.txt
 +++ b/library/CMakeLists.txt
 @@ -2,6 +2,8 @@ option(USE_STATIC_MBEDTLS_LIBRARY "Build Mbed TLS static library." ON)
@@ -29,7 +29,7 @@
  
  # Set the project root directory if it's not already defined, as may happen if
  # the library folder is included directly by a parent project, without
-@@ -255,7 +257,15 @@ if (USE_STATIC_MBEDTLS_LIBRARY)
+@@ -257,7 +259,15 @@ if (USE_STATIC_MBEDTLS_LIBRARY)
      set(mbedcrypto_static_target ${mbedcrypto_target})
  endif()
  
@@ -46,7 +46,7 @@
  
  if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY)
      string(APPEND mbedtls_static_target    "_static")
-@@ -263,9 +273,15 @@ if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY)
+@@ -265,9 +275,15 @@ if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY)
      string(APPEND mbedcrypto_static_target "_static")
  
      list(APPEND target_libraries
@@ -65,7 +65,7 @@
  endif()
  
  set(p256m_target "${MBEDTLS_TARGET_PREFIX}p256m")
-@@ -284,13 +300,17 @@ if(USE_STATIC_MBEDTLS_LIBRARY)
+@@ -286,13 +302,17 @@ if(USE_STATIC_MBEDTLS_LIBRARY)
          target_link_libraries(${mbedcrypto_static_target} PUBLIC ${p256m_target})
      endif()
  
@@ -89,32 +89,32 @@
  endif(USE_STATIC_MBEDTLS_LIBRARY)
  
  if(USE_SHARED_MBEDTLS_LIBRARY)
-@@ -306,14 +326,16 @@ if(USE_SHARED_MBEDTLS_LIBRARY)
+@@ -308,14 +328,16 @@ if(USE_SHARED_MBEDTLS_LIBRARY)
      if(TARGET ${p256m_target})
          target_link_libraries(${mbedcrypto_target} PUBLIC ${p256m_target})
      endif()
 -
 -    add_library(${mbedx509_target} SHARED ${src_x509})
--    set_target_properties(${mbedx509_target} PROPERTIES VERSION 3.5.1 SOVERSION 6)
+-    set_target_properties(${mbedx509_target} PROPERTIES VERSION 3.6.0 SOVERSION 7)
 -    target_link_libraries(${mbedx509_target} PUBLIC ${libs} ${mbedcrypto_target})
 -
 -    add_library(${mbedtls_target} SHARED ${src_tls})
--    set_target_properties(${mbedtls_target} PROPERTIES VERSION 3.5.1 SOVERSION 20)
+-    set_target_properties(${mbedtls_target} PROPERTIES VERSION 3.6.0 SOVERSION 21)
 -    target_link_libraries(${mbedtls_target} PUBLIC ${libs} ${mbedx509_target})
 +    if (BUIILD_X509 OR BUILD_TLS)
 +        add_library(${mbedx509_target} SHARED ${src_x509})
-+        set_target_properties(${mbedx509_target} PROPERTIES VERSION 3.5.1 SOVERSION 6)
++        set_target_properties(${mbedx509_target} PROPERTIES VERSION 3.6.0 SOVERSION 7)
 +        target_link_libraries(${mbedx509_target} PUBLIC ${libs} ${mbedcrypto_target})
 +    endif()
 +    if (BUILD_TLS)
 +        add_library(${mbedtls_target} SHARED ${src_tls})
-+        set_target_properties(${mbedtls_target} PROPERTIES VERSION 3.5.1 SOVERSION 20)
++        set_target_properties(${mbedtls_target} PROPERTIES VERSION 3.6.0 SOVERSION 21)
 +        target_link_libraries(${mbedtls_target} PUBLIC ${libs} ${mbedx509_target})
 +    endif()
  endif(USE_SHARED_MBEDTLS_LIBRARY)
  
  foreach(target IN LISTS target_libraries)
-@@ -349,7 +371,22 @@ endforeach(target)
+@@ -351,7 +373,22 @@ endforeach(target)
  
  set(lib_target "${MBEDTLS_TARGET_PREFIX}lib")
  
@@ -140,5 +140,5 @@
 +    endif()
  endif()
 -- 
-2.34.1
+2.25.1