COSE: Switch tests over to upstream t_cose

Switch from TF-M's t_cose library fork to the upstream repo
being downloaded from https://github.com/laurencelundblade/t_cose.

Change-Id: I9e2a859c67e902c6ecc1dc5ab996241e3d33e4ab
Signed-off-by: Adam Kulesza <adam.kulesza@arm.com>
Signed-off-by: David Vincze <david.vincze@arm.com>
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
diff --git a/lib/ext/t_cose/CMakeLists.txt b/lib/ext/t_cose/CMakeLists.txt
new file mode 100644
index 0000000..59e163b
--- /dev/null
+++ b/lib/ext/t_cose/CMakeLists.txt
@@ -0,0 +1,29 @@
+#-------------------------------------------------------------------------------
+# SPDX-License-Identifier: BSD-3-Clause
+# SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors
+#-------------------------------------------------------------------------------
+
+cmake_minimum_required(VERSION 3.21)
+
+if(NOT TEST_NS_ATTESTATION AND NOT TEST_NS_T_COSE)
+    return()
+endif()
+
+include(FetchContent)
+set(FETCHCONTENT_QUIET FALSE)
+
+# Default configuration of T_COSE repository
+set(T_COSE_PATH     "DOWNLOAD"      CACHE PATH      "Path to t_cose (or DOWNLOAD to fetch automatically")
+set(T_COSE_VERSION  "v2.0-alpha-2"  CACHE STRING    "The version of t_cose to use")
+
+fetch_remote_library(
+    LIB_NAME                t_cose
+    LIB_SOURCE_PATH_VAR     T_COSE_PATH
+    LIB_PATCH_DIR           ${CMAKE_CURRENT_LIST_DIR}
+    LIB_BASE_DIR            "${CMAKE_BINARY_DIR}/lib/ext"
+    FETCH_CONTENT_ARGS
+        GIT_REPOSITORY      https://github.com/laurencelundblade/t_cose.git
+        GIT_TAG             ${T_COSE_VERSION}
+        GIT_SHALLOW         TRUE
+        GIT_PROGRESS        TRUE
+)