Rename libpsa to libpsats

Instead of using a generic name for the library, give it a TS specific
name to avoid possible naming collisions with other psa libraries in
the future.

Change-Id: Icea9be4d836f7d22300b20c8d6a5f8bd8fae1133
Signed-off-by: Gabor Toth <gabor.toth2@arm.com>
diff --git a/deployments/libpsa/libpsa-import.cmake b/deployments/libpsa/libpsa-import.cmake
deleted file mode 100644
index 661b40d..0000000
--- a/deployments/libpsa/libpsa-import.cmake
+++ /dev/null
@@ -1,114 +0,0 @@
-#-------------------------------------------------------------------------------
-# Copyright (c) 2023, Arm Limited and Contributors. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-#-------------------------------------------------------------------------------
-
-#-------------------------------------------------------------------------------
-# Import libpsa into a dependent in-tree deployment build.  Where another
-# deployment uses libpsa, including this file in the dependent deployment
-# CMake build file allows libpsa to be built and installed into the binary
-# directory of the dependent.
-#-------------------------------------------------------------------------------
-option(CFG_FORCE_PREBUILT_LIBPSA Off)
-# Try to find a pre-build package.
-version_semver_read(FILE "${CMAKE_CURRENT_LIST_DIR}/version.txt" MAJOR _major MINOR _minor PATCH _patch)
-set(_verstring "${_major}.${_minor}.${_patch}")
-
-if (COVERAGE)
-	set(LIBPSA_BUILD_TYPE "DebugCoverage" CACHE STRING "Build type." FORCE)
-endif()
-
-find_package(libpsa "${_verstring}" QUIET PATHS ${CMAKE_CURRENT_BINARY_DIR}/libpsa_install/${TS_ENV}/lib/cmake/libpsa)
-if(NOT libpsa_FOUND)
-	if (CFG_FORCE_PREBUILT_LIBPSA)
-		string(CONCAT _msg "find_package() failed to find the \"libpsa\" package. Please pass -Dlibpsa_ROOT=<full path>"
-							" to cmake, where <full path> is the directory of the libpsaConfig.cmake file, or "
-							" pass -DCMAKE_FIND_ROOT_PATH=<path>, where <path> is the INSTALL_PREFIX used"
-							" when building libpsa. libpsa_ROOT can be set in the environment too."
-						   "If you wish to debug the search process pass -DCMAKE_FIND_DEBUG_MODE=ON to cmake.")
-		message(FATAL_ERROR ${_msg})
-	endif()
-	# Set build type, if a specific value is required. This leaves the default value in the hands of the
-	# libpsa deployment being built.
-	if (DEFINED LIBPSA_BUILD_TYPE)
-		set(_libpsa_build_type_arg "-DCMAKE_BUILD_TYPE=${LIBPSA_BUILD_TYPE}")
-	endif()
-
-	# If not successful, build libpsa as a sub-project.
-	execute_process(COMMAND
-		${CMAKE_COMMAND} -E env "CROSS_COMPILE=${CROSS_COMPILE}"
-		${CMAKE_COMMAND}
-			${_libpsa_build_type_arg}
-			-S ${TS_ROOT}/deployments/libpsa/${TS_ENV}
-			-B ${CMAKE_CURRENT_BINARY_DIR}/libpsa
-		RESULT_VARIABLE
-			_exec_error
-		)
-	unset(_libpsa_build_type_arg)
-	if (NOT _exec_error EQUAL 0)
-		message(FATAL_ERROR "Configuring libpsa failed. ${_exec_error}")
-	endif()
-	execute_process(COMMAND
-		${CMAKE_COMMAND} -E env "CROSS_COMPILE=${CROSS_COMPILE}"
-		${CMAKE_COMMAND}
-			--build ${CMAKE_CURRENT_BINARY_DIR}/libpsa
-			--parallel ${PROCESSOR_COUNT}
-		RESULT_VARIABLE
-			_exec_error
-		)
-	if (NOT _exec_error EQUAL 0)
-		message(FATAL_ERROR "Installing libpsa failed. ${_exec_error}")
-	endif()
-	execute_process(COMMAND
-		${CMAKE_COMMAND} -E env "CROSS_COMPILE=${CROSS_COMPILE}"
-		${CMAKE_COMMAND}
-			--install ${CMAKE_CURRENT_BINARY_DIR}/libpsa
-			--prefix ${CMAKE_CURRENT_BINARY_DIR}/libpsa_install
-		RESULT_VARIABLE
-			_exec_error
-		)
-	if (NOT _exec_error EQUAL 0)
-		message(FATAL_ERROR "Installing libpsa failed. ${_exec_error}")
-	endif()
-
-	install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/libpsa/cmake_install.cmake)
-
-	find_package(libpsa "${_verstring}" QUIET REQUIRED PATHS ${CMAKE_CURRENT_BINARY_DIR}/libpsa_install/${TS_ENV}/lib/cmake/libpsa)
-else()
-	message(STATUS "Using prebuilt libpsa from ${libpsa_DIR}")
-endif()
-
-# Cmake will use the same build type of the imported target as used by the main project. If no mapping is configured and
-# the matching build type is not found, cmake will fall back to any build type. Details of the fall back mechanism are not
-# documented.
-# If a mapping is defined, and the imported target does not define the mapped build type, cmake will treat the library
-# as not found.
-#
-# If LIBPSA_BUILD_TYPE is set and the main project wants to use a specific build type, configure build type mapping to
-# only allow using the requested build type.
-if (DEFINED LIBPSA_BUILD_TYPE)
-	set_target_properties(libpsa::psa PROPERTIES
-		MAP_IMPORTED_CONFIG_DEBUG				${LIBPSA_BUILD_TYPE}
-		MAP_IMPORTED_CONFIG_MINSIZEREL			${LIBPSA_BUILD_TYPE}
-		MAP_IMPORTED_CONFIG_MINSIZWITHDEBINFO	${LIBPSA_BUILD_TYPE}
-		MAP_IMPORTED_CONFIG_RELEASE				${LIBPSA_BUILD_TYPE}
-		MAP_IMPORTED_CONFIG_RELWITHDEBINFO		${LIBPSA_BUILD_TYPE}
-		MAP_IMPORTED_CONFIG_DEBUGCOVERAGE		${LIBPSA_BUILD_TYPE}
-	)
-
-	# Do a manual check and issue a better message than the default one.
-	get_property(_libpsa_build_type TARGET libpsa::psa PROPERTY IMPORTED_CONFIGURATIONS)
-	string(TOUPPER ${LIBPSA_BUILD_TYPE} _uc_libpsa_build_type)
-	if(${_uc_libpsa_build_type} IN_LIST _libpsa_build_type)
-	else()
-		message(FATAL_ERROR "Installed libpsa package does not supports required build type ${LIBPSA_BUILD_TYPE}.")
-	endif()
-	unset(_libpsa_build_type)
-	unset(_uc_libpsa_build_type)
-endif()
-
-# libpsa can not be used without libts, so add the needed dependency.
-include(${TS_ROOT}/deployments/libts/libts-import.cmake)
-target_link_libraries(libpsa::psa INTERFACE libts::ts)
diff --git a/deployments/libpsa/arm-linux/CMakeLists.txt b/deployments/libpsats/arm-linux/CMakeLists.txt
similarity index 81%
rename from deployments/libpsa/arm-linux/CMakeLists.txt
rename to deployments/libpsats/arm-linux/CMakeLists.txt
index 5fb9f4a..20e4f1b 100644
--- a/deployments/libpsa/arm-linux/CMakeLists.txt
+++ b/deployments/libpsats/arm-linux/CMakeLists.txt
@@ -16,29 +16,29 @@
 endif()
 
 #-------------------------------------------------------------------------------
-#  The CMakeLists.txt for building the libpsa deployment for arm-linux
+#  The CMakeLists.txt for building the libpsats deployment for arm-linux
 #
-#  Used for building the libpsa library for the arm-linux environment. Used for
+#  Used for building the libpsats library for the arm-linux environment. Used for
 #  locating and accessing services from a Linux userspace client. Service
 #  instances can be located in any supported secure processing environment.
 #-------------------------------------------------------------------------------
 include(${TS_ROOT}/environments/arm-linux/env_shared_lib.cmake)
-project(psa LANGUAGES CXX C)
+project(psats LANGUAGES CXX C)
 
-add_library(psa)
+add_library(psats)
 
-target_include_directories(psa PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
+target_include_directories(psats PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
 
 #-------------------------------------------------------------------------------
 #  For user-specific tracing set to TRACE_LEVEL_NONE and implement:
 #  void trace_puts(const char *str)
 #-------------------------------------------------------------------------------
 
-set(TRACE_PREFIX "LIBPSA" CACHE STRING "Trace prefix")
+set(TRACE_PREFIX "LIBPSATS" CACHE STRING "Trace prefix")
 set(TRACE_LEVEL "TRACE_LEVEL_DEBUG" CACHE STRING "Trace level")
 #-------------------------------------------------------------------------------
 #  Extend with components that are common across all deployments of
-#  libpsa
+#  libpsats
 #
 #-------------------------------------------------------------------------------
-include(../libpsa.cmake REQUIRED)
+include(../libpsats.cmake REQUIRED)
diff --git a/deployments/libpsats/libpsats-import.cmake b/deployments/libpsats/libpsats-import.cmake
new file mode 100644
index 0000000..9c44ca7
--- /dev/null
+++ b/deployments/libpsats/libpsats-import.cmake
@@ -0,0 +1,114 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2023, Arm Limited and Contributors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+#-------------------------------------------------------------------------------
+# Import libpsats into a dependent in-tree deployment build.  Where another
+# deployment uses libpsats, including this file in the dependent deployment
+# CMake build file allows libpsats to be built and installed into the binary
+# directory of the dependent.
+#-------------------------------------------------------------------------------
+option(CFG_FORCE_PREBUILT_LIBPSATS Off)
+# Try to find a pre-build package.
+version_semver_read(FILE "${CMAKE_CURRENT_LIST_DIR}/version.txt" MAJOR _major MINOR _minor PATCH _patch)
+set(_verstring "${_major}.${_minor}.${_patch}")
+
+if (COVERAGE)
+	set(LIBPSATS_BUILD_TYPE "DebugCoverage" CACHE STRING "Build type." FORCE)
+endif()
+
+find_package(libpsats "${_verstring}" QUIET PATHS ${CMAKE_CURRENT_BINARY_DIR}/libpsats_install/${TS_ENV}/lib/cmake/libpsats)
+if(NOT libpsats_FOUND)
+	if (CFG_FORCE_PREBUILT_LIBPSATS)
+		string(CONCAT _msg "find_package() failed to find the \"libpsats\" package. Please pass -Dlibpsats_ROOT=<full path>"
+							" to cmake, where <full path> is the directory of the libpsatsConfig.cmake file, or "
+							" pass -DCMAKE_FIND_ROOT_PATH=<path>, where <path> is the INSTALL_PREFIX used"
+							" when building libpsats. libpsats_ROOT can be set in the environment too."
+						   "If you wish to debug the search process pass -DCMAKE_FIND_DEBUG_MODE=ON to cmake.")
+		message(FATAL_ERROR ${_msg})
+	endif()
+	# Set build type, if a specific value is required. This leaves the default value in the hands of the
+	# libpsats deployment being built.
+	if (DEFINED LIBPSATS_BUILD_TYPE)
+		set(_libpsats_build_type_arg "-DCMAKE_BUILD_TYPE=${LIBPSATS_BUILD_TYPE}")
+	endif()
+
+	# If not successful, build libpsats as a sub-project.
+	execute_process(COMMAND
+		${CMAKE_COMMAND} -E env "CROSS_COMPILE=${CROSS_COMPILE}"
+		${CMAKE_COMMAND}
+			${_libpsats_build_type_arg}
+			-S ${TS_ROOT}/deployments/libpsats/${TS_ENV}
+			-B ${CMAKE_CURRENT_BINARY_DIR}/libpsats
+		RESULT_VARIABLE
+			_exec_error
+		)
+	unset(_libpsats_build_type_arg)
+	if (NOT _exec_error EQUAL 0)
+		message(FATAL_ERROR "Configuring libpsats failed. ${_exec_error}")
+	endif()
+	execute_process(COMMAND
+		${CMAKE_COMMAND} -E env "CROSS_COMPILE=${CROSS_COMPILE}"
+		${CMAKE_COMMAND}
+			--build ${CMAKE_CURRENT_BINARY_DIR}/libpsats
+			--parallel ${PROCESSOR_COUNT}
+		RESULT_VARIABLE
+			_exec_error
+		)
+	if (NOT _exec_error EQUAL 0)
+		message(FATAL_ERROR "Installing libpsats failed. ${_exec_error}")
+	endif()
+	execute_process(COMMAND
+		${CMAKE_COMMAND} -E env "CROSS_COMPILE=${CROSS_COMPILE}"
+		${CMAKE_COMMAND}
+			--install ${CMAKE_CURRENT_BINARY_DIR}/libpsats
+			--prefix ${CMAKE_CURRENT_BINARY_DIR}/libpsats_install
+		RESULT_VARIABLE
+			_exec_error
+		)
+	if (NOT _exec_error EQUAL 0)
+		message(FATAL_ERROR "Installing libpsats failed. ${_exec_error}")
+	endif()
+
+	install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/libpsats/cmake_install.cmake)
+
+	find_package(libpsats "${_verstring}" QUIET REQUIRED PATHS ${CMAKE_CURRENT_BINARY_DIR}/libpsats_install/${TS_ENV}/lib/cmake/libpsats)
+else()
+	message(STATUS "Using prebuilt libpsats from ${libpsats_DIR}")
+endif()
+
+# Cmake will use the same build type of the imported target as used by the main project. If no mapping is configured and
+# the matching build type is not found, cmake will fall back to any build type. Details of the fall back mechanism are not
+# documented.
+# If a mapping is defined, and the imported target does not define the mapped build type, cmake will treat the library
+# as not found.
+#
+# If LIBPSATS_BUILD_TYPE is set and the main project wants to use a specific build type, configure build type mapping to
+# only allow using the requested build type.
+if (DEFINED LIBPSATS_BUILD_TYPE)
+	set_target_properties(libpsats::psats PROPERTIES
+		MAP_IMPORTED_CONFIG_DEBUG				${LIBPSATS_BUILD_TYPE}
+		MAP_IMPORTED_CONFIG_MINSIZEREL			${LIBPSATS_BUILD_TYPE}
+		MAP_IMPORTED_CONFIG_MINSIZWITHDEBINFO	${LIBPSATS_BUILD_TYPE}
+		MAP_IMPORTED_CONFIG_RELEASE				${LIBPSATS_BUILD_TYPE}
+		MAP_IMPORTED_CONFIG_RELWITHDEBINFO		${LIBPSATS_BUILD_TYPE}
+		MAP_IMPORTED_CONFIG_DEBUGCOVERAGE		${LIBPSATS_BUILD_TYPE}
+	)
+
+	# Do a manual check and issue a better message than the default one.
+	get_property(_libpsats_build_type TARGET libpsats::psats PROPERTY IMPORTED_CONFIGURATIONS)
+	string(TOUPPER ${LIBPSATS_BUILD_TYPE} _uc_libpsats_build_type)
+	if(${_uc_libpsats_build_type} IN_LIST _libpsats_build_type)
+	else()
+		message(FATAL_ERROR "Installed libpsats package does not supports required build type ${LIBPSATS_BUILD_TYPE}.")
+	endif()
+	unset(_libpsats_build_type)
+	unset(_uc_libpsats_build_type)
+endif()
+
+# libpsats can not be used without libts, so add the needed dependency.
+include(${TS_ROOT}/deployments/libts/libts-import.cmake)
+target_link_libraries(libpsats::psats INTERFACE libts::ts)
diff --git a/deployments/libpsa/libpsa.cmake b/deployments/libpsats/libpsats.cmake
similarity index 80%
rename from deployments/libpsa/libpsa.cmake
rename to deployments/libpsats/libpsats.cmake
index d5ca8e5..9ce0039 100644
--- a/deployments/libpsa/libpsa.cmake
+++ b/deployments/libpsats/libpsats.cmake
@@ -6,27 +6,27 @@
 #-------------------------------------------------------------------------------
 
 #-------------------------------------------------------------------------------
-#  The base build file shared between deployments of 'libpsa' for different
-#  environments.  libpsa provides an interface for accessing PSA API-s.
+#  The base build file shared between deployments of 'libpsats' for different
+#  environments.  libpsats provides an interface for accessing PSA API-s.
 #  Building with each build type results in different postfix for the library.
 #  For details, please refer to deployment.cmake.
 #-------------------------------------------------------------------------------
 
 #-------------------------------------------------------------------------------
-#  Common API version implemented by all libpsa deployments
+#  Common API version implemented by all libpsats deployments
 #-------------------------------------------------------------------------------
 version_semver_read(FILE "${CMAKE_CURRENT_LIST_DIR}/version.txt"
 					MAJOR _major MINOR _minor PATCH _patch)
-set_target_properties(psa PROPERTIES VERSION "${_major}.${_minor}.${_patch}")
-set_target_properties(psa PROPERTIES SOVERSION "${_major}")
+set_target_properties(psats PROPERTIES VERSION "${_major}.${_minor}.${_patch}")
+set_target_properties(psats PROPERTIES SOVERSION "${_major}")
 unset(_major)
 unset(_minor)
 unset(_patch)
 
-add_library(libpsa::psa ALIAS psa)
+add_library(libpsats::psats ALIAS psats)
 
 if (COVERAGE)
-	set(LIBPSA_BUILD_TYPE "DebugCoverage" CACHE STRING "Build type." FORCE)
+	set(LIBPSATS_BUILD_TYPE "DebugCoverage" CACHE STRING "Build type." FORCE)
 endif()
 
 #-------------------------------------------------------------------------------
@@ -35,7 +35,7 @@
 #  deployed.
 #-------------------------------------------------------------------------------
 include(${TS_ROOT}/deployments/libts/libts-import.cmake)
-target_link_libraries(psa PUBLIC libts::ts)
+target_link_libraries(psats PUBLIC libts::ts)
 
 #-------------------------------------------------------------------------------
 #  Components that are common across all deployments
@@ -43,13 +43,13 @@
 #-------------------------------------------------------------------------------
 
 add_components(
-	TARGET "psa"
+	TARGET "psats"
 	BASE_DIR ${TS_ROOT}
 	COMPONENTS
 		"environments/${TS_ENV}"
 		"components/common/utils"
 		"components/common/trace"
-		"components/common/libpsa"
+		"components/common/libpsats"
 		"components/common/tlv"
 		"components/service/common/include"
 		"components/service/common/client"
@@ -70,8 +70,8 @@
 #-------------------------------------------------------------------------------
 
 # Enable exporting interface symbols for library public interface
-target_compile_definitions(psa PRIVATE
-	EXPORT_PUBLIC_INTERFACE_LIBPSA
+target_compile_definitions(psats PRIVATE
+	EXPORT_PUBLIC_INTERFACE_LIBPSATS
 	EXPORT_PUBLIC_INTERFACE_PSA_CRYPTO
 	EXPORT_PUBLIC_INTERFACE_PSA_ATTEST
 	EXPORT_PUBLIC_INTERFACE_PSA_ITS
@@ -86,9 +86,9 @@
 
 # Exports library information in preparation for install
 export_library(
-	TARGET "psa"
-	LIB_NAME "libpsa"
-	PKG_CONFIG_FILE "${CMAKE_CURRENT_LIST_DIR}/libpsaConfig.cmake.in"
+	TARGET "psats"
+	LIB_NAME "libpsats"
+	PKG_CONFIG_FILE "${CMAKE_CURRENT_LIST_DIR}/libpsatsConfig.cmake.in"
 )
 
 install(DIRECTORY "${TS_ROOT}/components/service/crypto/include"
@@ -102,6 +102,6 @@
 		DESTINATION ${TS_ENV}/include/psa
 )
 
-install(FILES "${TS_ROOT}/components/common/libpsa/libpsa.h"
+install(FILES "${TS_ROOT}/components/common/libpsats/libpsats.h"
 		DESTINATION ${TS_ENV}/include
 )
diff --git a/deployments/libpsa/libpsaConfig.cmake.in b/deployments/libpsats/libpsatsConfig.cmake.in
similarity index 69%
rename from deployments/libpsa/libpsaConfig.cmake.in
rename to deployments/libpsats/libpsatsConfig.cmake.in
index 710411b..f23ed8d 100644
--- a/deployments/libpsa/libpsaConfig.cmake.in
+++ b/deployments/libpsats/libpsatsConfig.cmake.in
@@ -6,4 +6,4 @@
 
 @PACKAGE_INIT@
 
-include("${CMAKE_CURRENT_LIST_DIR}/libpsaTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/libpsatsTargets.cmake")
diff --git a/deployments/libpsa/linux-pc/CMakeLists.txt b/deployments/libpsats/linux-pc/CMakeLists.txt
similarity index 81%
rename from deployments/libpsa/linux-pc/CMakeLists.txt
rename to deployments/libpsats/linux-pc/CMakeLists.txt
index 7d45a36..1d3696b 100644
--- a/deployments/libpsa/linux-pc/CMakeLists.txt
+++ b/deployments/libpsats/linux-pc/CMakeLists.txt
@@ -16,29 +16,29 @@
 endif()
 
 #-------------------------------------------------------------------------------
-#  The CMakeLists.txt for building the libpsa deployment for arm-linux
+#  The CMakeLists.txt for building the libpsats deployment for arm-linux
 #
-#  Used for building the libpsa library for the arm-linux environment. Used for
+#  Used for building the libpsats library for the arm-linux environment. Used for
 #  locating and accessing services from a Linux userspace client. Service
 #  instances can be located in any supported secure processing environment.
 #-------------------------------------------------------------------------------
 include(${TS_ROOT}/environments/linux-pc/env_shared_lib.cmake)
-project(psa LANGUAGES CXX C)
+project(psats LANGUAGES CXX C)
 
-add_library(psa)
+add_library(psats)
 
-target_include_directories(psa PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
+target_include_directories(psats PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
 
 #-------------------------------------------------------------------------------
 #  For user-specific tracing set to TRACE_LEVEL_NONE and implement:
 #  void trace_puts(const char *str)
 #-------------------------------------------------------------------------------
 
-set(TRACE_PREFIX "LIBPSA" CACHE STRING "Trace prefix")
+set(TRACE_PREFIX "LIBPSATS" CACHE STRING "Trace prefix")
 set(TRACE_LEVEL "TRACE_LEVEL_DEBUG" CACHE STRING "Trace level")
 #-------------------------------------------------------------------------------
 #  Extend with components that are common across all deployments of
-#  libpsa
+#  libpsats
 #
 #-------------------------------------------------------------------------------
-include(../libpsa.cmake REQUIRED)
+include(../libpsats.cmake REQUIRED)
diff --git a/deployments/libpsa/version.txt b/deployments/libpsats/version.txt
similarity index 100%
rename from deployments/libpsa/version.txt
rename to deployments/libpsats/version.txt
diff --git a/deployments/platform-inspect/platform-inspect.cmake b/deployments/platform-inspect/platform-inspect.cmake
index b31f39f..d9f1ca7 100644
--- a/deployments/platform-inspect/platform-inspect.cmake
+++ b/deployments/platform-inspect/platform-inspect.cmake
@@ -11,16 +11,16 @@
 #-------------------------------------------------------------------------------
 
 #-------------------------------------------------------------------------------
-#  Use libpsa for locating PSA services. An appropriate version of
-#  libpsa will be imported for the environment.
+#  Use libpsats for locating PSA services. An appropriate version of
+#  libpsats will be imported for the environment.
 #-------------------------------------------------------------------------------
 if (COVERAGE)
-	set(LIBPSA_BUILD_TYPE "DEBUGCOVERAGE" CACHE STRING "Libpsa build type" FORCE)
+	set(LIBPSATS_BUILD_TYPE "DEBUGCOVERAGE" CACHE STRING "Libpsats build type" FORCE)
 	set(LIBTS_BUILD_TYPE "DEBUGCOVERAGE" CACHE STRING "Libts build type" FORCE)
 endif()
 
-include(${TS_ROOT}/deployments/libpsa/libpsa-import.cmake)
-target_link_libraries(platform-inspect PRIVATE libpsa::psa)
+include(${TS_ROOT}/deployments/libpsats/libpsats-import.cmake)
+target_link_libraries(platform-inspect PRIVATE libpsats::psats)
 
 #-------------------------------------------------------------------------------
 #  Components that are common across all deployments
diff --git a/deployments/psa-api-test/crypto/crypto.c b/deployments/psa-api-test/crypto/crypto.c
index 9cbc67b..612012d 100644
--- a/deployments/psa-api-test/crypto/crypto.c
+++ b/deployments/psa-api-test/crypto/crypto.c
@@ -5,7 +5,7 @@
  */
 
 #include "../psa_api_test_common.h"
-#include "libpsa.h"
+#include "libpsats.h"
 #include "trace.h"
 
 psa_status_t test_setup(const char *service_name_crypto, const char *service_name_iat,
@@ -16,9 +16,9 @@
 	if (!service_name_crypto)
 		service_name_crypto = "sn:trustedfirmware.org:crypto:0";
 
-	psa_status = libpsa_init_crypto_context(service_name_crypto);
+	psa_status = libpsats_init_crypto_context(service_name_crypto);
 	if (psa_status) {
-		EMSG("libpsa_init_crypto_context failed: %d\n", psa_status);
+		EMSG("libpsats_init_crypto_context failed: %d\n", psa_status);
 		return psa_status;
 	}
 
@@ -33,5 +33,5 @@
 
 void test_teardown(void)
 {
-	libpsa_deinit_crypto_context();
+	libpsats_deinit_crypto_context();
 }
diff --git a/deployments/psa-api-test/initial_attestation/iat.c b/deployments/psa-api-test/initial_attestation/iat.c
index eb03dc7..438bb58 100644
--- a/deployments/psa-api-test/initial_attestation/iat.c
+++ b/deployments/psa-api-test/initial_attestation/iat.c
@@ -5,7 +5,7 @@
  */
 
 #include "../psa_api_test_common.h"
-#include "libpsa.h"
+#include "libpsats.h"
 #include "trace.h"
 
 psa_status_t test_setup(const char *service_name_crypto, const char *service_name_iat,
@@ -19,15 +19,15 @@
 	if (!service_name_iat)
 		service_name_iat = "sn:trustedfirmware.org:attestation:0";
 
-	psa_status = libpsa_init_crypto_context(service_name_crypto);
+	psa_status = libpsats_init_crypto_context(service_name_crypto);
 	if (psa_status) {
-		EMSG("libpsa_init_crypto_context failed: %d\n", psa_status);
+		EMSG("libpsats_init_crypto_context failed: %d\n", psa_status);
 		return psa_status;
 	}
 
-	psa_status = libpsa_init_attestation_context(service_name_iat);
+	psa_status = libpsats_init_attestation_context(service_name_iat);
 	if (psa_status) {
-		EMSG("libpsa_init_attestation_context failed: %d\n", psa_status);
+		EMSG("libpsats_init_attestation_context failed: %d\n", psa_status);
 		return psa_status;
 	}
 
@@ -42,6 +42,6 @@
 
 void test_teardown(void)
 {
-	libpsa_deinit_crypto_context();
-	libpsa_deinit_attestation_context();
+	libpsats_deinit_crypto_context();
+	libpsats_deinit_attestation_context();
 }
diff --git a/deployments/psa-api-test/internal_trusted_storage/its.c b/deployments/psa-api-test/internal_trusted_storage/its.c
index 9f3860b..38b3d58 100644
--- a/deployments/psa-api-test/internal_trusted_storage/its.c
+++ b/deployments/psa-api-test/internal_trusted_storage/its.c
@@ -5,7 +5,7 @@
  */
 
 #include "../psa_api_test_common.h"
-#include "libpsa.h"
+#include "libpsats.h"
 #include "trace.h"
 
 psa_status_t test_setup(const char *service_name_crypto, const char *service_name_iat,
@@ -16,9 +16,9 @@
 	if (!service_name_its)
 		service_name_its = "sn:trustedfirmware.org:internal-trusted-storage:0";
 
-	psa_status = libpsa_init_its_context(service_name_its);
+	psa_status = libpsats_init_its_context(service_name_its);
 	if (psa_status) {
-		EMSG("libpsa_init_its_context failed: %d\n", psa_status);
+		EMSG("libpsats_init_its_context failed: %d\n", psa_status);
 		return psa_status;
 	}
 
@@ -27,5 +27,5 @@
 
 void test_teardown(void)
 {
-	libpsa_deinit_its_context();
+	libpsats_deinit_its_context();
 }
diff --git a/deployments/psa-api-test/protected_storage/ps.c b/deployments/psa-api-test/protected_storage/ps.c
index c20a860..2f0a800 100644
--- a/deployments/psa-api-test/protected_storage/ps.c
+++ b/deployments/psa-api-test/protected_storage/ps.c
@@ -5,7 +5,7 @@
  */
 
 #include "../psa_api_test_common.h"
-#include "libpsa.h"
+#include "libpsats.h"
 #include "trace.h"
 
 psa_status_t test_setup(const char *service_name_crypto, const char *service_name_iat,
@@ -16,9 +16,9 @@
 	if (!service_name_ps)
 		service_name_ps = "sn:trustedfirmware.org:protected-storage:0";
 
-	psa_status = libpsa_init_ps_context(service_name_ps);
+	psa_status = libpsats_init_ps_context(service_name_ps);
 	if (psa_status) {
-		EMSG("libpsa_init_ps_context failed: %d\n", psa_status);
+		EMSG("libpsats_init_ps_context failed: %d\n", psa_status);
 		return psa_status;
 	}
 
@@ -27,5 +27,5 @@
 
 void test_teardown(void)
 {
-	libpsa_deinit_ps_context();
+	libpsats_deinit_ps_context();
 }
diff --git a/deployments/psa-api-test/psa-api-test.cmake b/deployments/psa-api-test/psa-api-test.cmake
index 021d431..b005e26 100644
--- a/deployments/psa-api-test/psa-api-test.cmake
+++ b/deployments/psa-api-test/psa-api-test.cmake
@@ -20,17 +20,17 @@
 )
 
 #-------------------------------------------------------------------------------
-#  Use libpsa for locating PSA services. An appropriate version of
-#  libpsa will be imported for the environment. Making sure the link order is
+#  Use libpsats for locating PSA services. An appropriate version of
+#  libpsats will be imported for the environment. Making sure the link order is
 #  correct.
 #-------------------------------------------------------------------------------
 if (COVERAGE)
-	set(LIBPSA_BUILD_TYPE "DEBUGCOVERAGE" CACHE STRING "Libpsa build type" FORCE)
+	set(LIBPSATS_BUILD_TYPE "DEBUGCOVERAGE" CACHE STRING "Libpsats build type" FORCE)
 	set(LIBTS_BUILD_TYPE "DEBUGCOVERAGE" CACHE STRING "Libts build type" FORCE)
 endif()
 
-include(${TS_ROOT}/deployments/libpsa/libpsa-import.cmake)
-target_link_libraries( ${PROJECT_NAME} PRIVATE libpsa::psa)
+include(${TS_ROOT}/deployments/libpsats/libpsats-import.cmake)
+target_link_libraries( ${PROJECT_NAME} PRIVATE libpsats::psats)
 
 target_link_libraries(${PROJECT_NAME} PRIVATE val_nspe test_combine pal_nspe)
 
diff --git a/deployments/ts-demo/ts-demo.c b/deployments/ts-demo/ts-demo.c
index c7ef52b..5efce9f 100644
--- a/deployments/ts-demo/ts-demo.c
+++ b/deployments/ts-demo/ts-demo.c
@@ -9,7 +9,7 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "libpsa.h"
+#include "libpsats.h"
 
 int main(int argc, char *argv[])
 {
@@ -19,16 +19,16 @@
 	if (argc > 1)
 		service_name = argv[1];
 
-	psa_status = libpsa_init_crypto_context(service_name);
+	psa_status = libpsats_init_crypto_context(service_name);
 
 	if (psa_status) {
-		printf("libpsa_init_crypto_context failed: %d\n", psa_status);
+		printf("libpsats_init_crypto_context failed: %d\n", psa_status);
 		return psa_status;
 	}
 
 	psa_status = run_ts_demo(true);
 
-	libpsa_deinit_its_context();
+	libpsats_deinit_its_context();
 
 	if (psa_status)
 		printf("\n*** ts-demo failed ***\n\n");
diff --git a/deployments/ts-demo/ts-demo.cmake b/deployments/ts-demo/ts-demo.cmake
index 2d39042..b663fb6 100644
--- a/deployments/ts-demo/ts-demo.cmake
+++ b/deployments/ts-demo/ts-demo.cmake
@@ -12,16 +12,16 @@
 #-------------------------------------------------------------------------------
 
 #-------------------------------------------------------------------------------
-#  Use libpsa for locating PSA services. An appropriate version of
-#  libpsa will be imported for the environment.
+#  Use libpsats for locating PSA services. An appropriate version of
+#  libpsats will be imported for the environment.
 #-------------------------------------------------------------------------------
 if (COVERAGE)
-	set(LIBPSA_BUILD_TYPE "DEBUGCOVERAGE" CACHE STRING "Libpsa build type" FORCE)
+	set(LIBPSATS_BUILD_TYPE "DEBUGCOVERAGE" CACHE STRING "Libpsats build type" FORCE)
 	set(LIBTS_BUILD_TYPE "DEBUGCOVERAGE" CACHE STRING "Libts build type" FORCE)
 endif()
 
-include(${TS_ROOT}/deployments/libpsa/libpsa-import.cmake)
-target_link_libraries(ts-demo PRIVATE libpsa::psa)
+include(${TS_ROOT}/deployments/libpsats/libpsats-import.cmake)
+target_link_libraries(ts-demo PRIVATE libpsats::psats)
 
 #-------------------------------------------------------------------------------
 #  Common main for all deployments