From 4a940e0c5e2633d07281926695311b5394fc34a4 Mon Sep 17 00:00:00 2001 From: aidan garske Date: Thu, 26 Sep 2024 14:48:45 -0700 Subject: [PATCH] Quick fix tpm support --- examples/client/client.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/client/client.c b/examples/client/client.c index fb3836bff..34d838752 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -127,7 +127,9 @@ static void ShowUsage(void) static const char* pubKeyName = NULL; -static const char* certName = NULL; +#ifdef WOLFSSH_CERTS + static const char* certName = NULL; +#endif static const char* caCert = NULL; @@ -784,9 +786,15 @@ THREAD_RETURN WOLFSSH_THREAD client_test(void* args) err_sys("Threading needed for terminal session\n"); #endif #ifndef WOLFSSH_TPM + #ifdef WOLFSSH_CERTS if ((pubKeyName == NULL && certName == NULL) && privKeyName != NULL) { err_sys("If setting priv key, need pub key."); } + #else + if (pubKeyName == NULL && privKeyName != NULL) { + err_sys("If setting priv key, need pub key."); + } + #endif #endif ret = ClientSetPrivateKey(privKeyName, userEcc, NULL); if (ret != 0) {