mirror of https://github.com/wolfSSL/wolfTPM.git
Fix `WOLFTPM2_USE_SW_ECDHE`.
parent
082f22ed43
commit
679020dd70
|
|
@ -180,11 +180,15 @@ int wolfTPM2_CryptoDevCb(int devId, wc_CryptoInfo* info, void* ctx)
|
|||
int curve_id;
|
||||
WOLFTPM2_KEY* key;
|
||||
|
||||
#ifdef WOLFTPM2_USE_SW_ECDHE
|
||||
if (tlsCtx->ecdhKey == NULL) {
|
||||
return exit_rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( tlsCtx->eccKey == NULL
|
||||
&& tlsCtx->ecdsaKey == NULL
|
||||
#ifndef WOLFTPM2_USE_SW_ECDHE
|
||||
&& tlsCtx->ecdhKey == NULL
|
||||
#endif
|
||||
) {
|
||||
#ifdef DEBUG_WOLFTPM
|
||||
printf("No crypto callback key pointer set!\n");
|
||||
|
|
|
|||
|
|
@ -3347,9 +3347,7 @@ typedef struct TpmCryptoDevCtx {
|
|||
#ifdef HAVE_ECC
|
||||
WOLFTPM2_KEY* eccKey; /* ECDSA - public only */
|
||||
WOLFTPM2_KEYBLOB* ecdsaKey; /* ECDSA - retain encrypted private portion from keygen */
|
||||
#ifndef WOLFTPM2_USE_SW_ECDHE
|
||||
WOLFTPM2_KEY* ecdhKey; /* ECDH */
|
||||
#endif
|
||||
#endif
|
||||
WOLFTPM2_KEY* storageKey;
|
||||
#ifdef WOLFTPM_USE_SYMMETRIC
|
||||
|
|
|
|||
Loading…
Reference in New Issue