mirror of https://github.com/wolfSSL/wolfTPM.git
Build fixes when using `WOLFTPM2_USE_SW_ECDHE`.
parent
e6672d94a6
commit
80c5e5a2b6
|
@ -85,7 +85,9 @@ int TPM2_TLS_Client(void* userCtx)
|
|||
#ifdef HAVE_ECC
|
||||
WOLFTPM2_KEY eccKey;
|
||||
ecc_key wolfEccKey;
|
||||
#ifndef WOLFTPM2_USE_SW_ECDHE
|
||||
WOLFTPM2_KEY ecdhKey;
|
||||
#endif
|
||||
#endif
|
||||
TPMT_PUBLIC publicTemplate;
|
||||
TpmCryptoDevCtx tpmCtx;
|
||||
|
@ -222,9 +224,11 @@ int TPM2_TLS_Client(void* userCtx)
|
|||
rc = wolfTPM2_EccKey_TpmToWolf(&dev, &eccKey, &wolfEccKey);
|
||||
if (rc != 0) goto exit;
|
||||
|
||||
#ifndef WOLFTPM2_USE_SW_ECDHE
|
||||
/* Ephemeral Key */
|
||||
XMEMSET(&ecdhKey, 0, sizeof(ecdhKey));
|
||||
tpmCtx.ecdhKey = &ecdhKey;
|
||||
#endif
|
||||
#endif /* HAVE_ECC */
|
||||
|
||||
|
||||
|
|
|
@ -82,7 +82,9 @@ int TPM2_TLS_Server(void* userCtx)
|
|||
#ifdef HAVE_ECC
|
||||
WOLFTPM2_KEY eccKey;
|
||||
ecc_key wolfEccKey;
|
||||
#ifndef WOLFTPM2_USE_SW_ECDHE
|
||||
WOLFTPM2_KEY ecdhKey;
|
||||
#endif
|
||||
#endif
|
||||
TPMT_PUBLIC publicTemplate;
|
||||
TpmCryptoDevCtx tpmCtx;
|
||||
|
@ -230,9 +232,11 @@ int TPM2_TLS_Server(void* userCtx)
|
|||
rc = wolfTPM2_EccKey_TpmToWolf(&dev, &eccKey, &wolfEccKey);
|
||||
if (rc != 0) goto exit;
|
||||
|
||||
#ifndef WOLFTPM2_USE_SW_ECDHE
|
||||
/* Ephemeral Key */
|
||||
XMEMSET(&ecdhKey, 0, sizeof(ecdhKey));
|
||||
tpmCtx.ecdhKey = &ecdhKey;
|
||||
#endif
|
||||
#endif /* HAVE_ECC */
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue