Update CMake linkage tests to new call signature

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
diff --git a/programs/test/cmake_package/cmake_package.c b/programs/test/cmake_package/cmake_package.c
index f7d5230..cd050e9 100644
--- a/programs/test/cmake_package/cmake_package.c
+++ b/programs/test/cmake_package/cmake_package.c
@@ -18,10 +18,7 @@
  * linkage works, but that is all. */
 int main()
 {
-    /* This version string is 18 bytes long, as advised by version.h. */
-    char version[18];
-
-    mbedtls_version_get_string_full(version);
+    const char *version = mbedtls_version_get_string_full();
 
     mbedtls_printf("Built against %s\n", version);
 
diff --git a/programs/test/cmake_package_install/cmake_package_install.c b/programs/test/cmake_package_install/cmake_package_install.c
index fb68883..a63f7db 100644
--- a/programs/test/cmake_package_install/cmake_package_install.c
+++ b/programs/test/cmake_package_install/cmake_package_install.c
@@ -19,10 +19,7 @@
  * linkage works, but that is all. */
 int main()
 {
-    /* This version string is 18 bytes long, as advised by version.h. */
-    char version[18];
-
-    mbedtls_version_get_string_full(version);
+    const char *version = mbedtls_version_get_string_full();
 
     mbedtls_printf("Built against %s\n", version);
 
diff --git a/programs/test/cmake_subproject/cmake_subproject.c b/programs/test/cmake_subproject/cmake_subproject.c
index efab789..69b5d0b 100644
--- a/programs/test/cmake_subproject/cmake_subproject.c
+++ b/programs/test/cmake_subproject/cmake_subproject.c
@@ -19,10 +19,7 @@
  * linkage works, but that is all. */
 int main()
 {
-    /* This version string is 18 bytes long, as advised by version.h. */
-    char version[18];
-
-    mbedtls_version_get_string_full(version);
+    const char *version = mbedtls_version_get_string_full();
 
     mbedtls_printf("Built against %s\n", version);