Skip to content

Commit

Permalink
Quick fix tpm support
Browse files Browse the repository at this point in the history
  • Loading branch information
aidangarske committed Sep 26, 2024
1 parent 7782466 commit 4a940e0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion examples/client/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;


Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 4a940e0

Please sign in to comment.