crypto-client test: ensure that client/server are linked against proper MbedTLS libraries
Ensure that both server and client can call mbedtls_version_get_string_full()
to verify that they are linked against proper libraries.
Note: each side (client/server) performs the call against its own
MbedTLS library. There is no IPC communication involved in this
test. Client/server communication will come later.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
diff --git a/tests/psa-client-server/psasim/test/client.c b/tests/psa-client-server/psasim/test/client.c
index 5bde82f..3c61120 100644
--- a/tests/psa-client-server/psasim/test/client.c
+++ b/tests/psa-client-server/psasim/test/client.c
@@ -5,19 +5,27 @@
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/
+#include <stdio.h>
+#include <unistd.h>
+
#include <psa/client.h>
#include <psa/util.h>
#include "psa_manifest/sid.h"
-#include <stdio.h>
-#include <unistd.h>
+
+#include "mbedtls/version.h"
#define CLIENT_PRINT(fmt, ...) \
PRINT("Client: " fmt, ##__VA_ARGS__)
int main()
{
+ char mbedtls_version[18];
const char *text = "FOOBARCOOL!!";
char output[100] = { 0 };
+
+ mbedtls_version_get_string_full(mbedtls_version);
+ CLIENT_PRINT("%s", mbedtls_version);
+
CLIENT_PRINT("My PID: %d", getpid());
CLIENT_PRINT("PSA version: %u", psa_version(PSA_SID_SHA256_SID));