Build: Change t_cose sources to private

Changes the tfm_t_cose_ns library sources to private, and avoids
relying on indirect linking to dependencies in other targets.

Change-Id: I221cb1e7b1d362cd3235592116a55c2ed6d24304
Signed-off-by: Jamie Fox <jamie.fox@arm.com>
diff --git a/tests_reg/test/secure_fw/suites/attestation/secure/CMakeLists.txt b/tests_reg/test/secure_fw/suites/attestation/secure/CMakeLists.txt
index 85e8571..7934332 100644
--- a/tests_reg/test/secure_fw/suites/attestation/secure/CMakeLists.txt
+++ b/tests_reg/test/secure_fw/suites/attestation/secure/CMakeLists.txt
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2024, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -45,8 +45,8 @@
         tfm_test_framework_s
         tfm_attestation_defs
         tfm_boot_status
-        tfm_psa_rot_partition_crypto
         platform_s
+        psa_crypto_config
 )
 
 target_link_libraries(tfm_s_tests
diff --git a/tests_reg/test/secure_fw/suites/t_cose/non_secure/CMakeLists.txt b/tests_reg/test/secure_fw/suites/t_cose/non_secure/CMakeLists.txt
index 088a318..5ec5ddb 100644
--- a/tests_reg/test/secure_fw/suites/t_cose/non_secure/CMakeLists.txt
+++ b/tests_reg/test/secure_fw/suites/t_cose/non_secure/CMakeLists.txt
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020-2021, Arm Limited. All rights reserved.
+# Copyright (c) 2020-2024, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -19,8 +19,9 @@
 
 target_link_libraries(tfm_t_cose_ns
     PUBLIC
-        tfm_t_cose_common
         tfm_t_cose_defs
+    PRIVATE
+        tfm_t_cose_common
         tfm_qcbor_ns
         tfm_api_ns
 )
@@ -49,8 +50,10 @@
 )
 
 target_link_libraries(tfm_t_cose_test
-    PUBLIC
+    PRIVATE
         tfm_t_cose_ns
+        tfm_qcbor_ns
+        tfm_api_ns
 )
 
 ####################### Non Secure #############################################
@@ -84,8 +87,3 @@
     INTERFACE
         tfm_test_suite_t_cose_ns
 )
-
-target_link_libraries(tfm_t_cose_test
-    PRIVATE
-        tfm_t_cose_ns
-)