Improve the ECC macro checks for `wc_EccPublicKeyToDer`.

pull/323/head
David Garske 2024-01-19 13:26:19 -08:00
parent 9e9285fce4
commit 9f243d39bb
1 changed files with 2 additions and 1 deletions

View File

@ -2751,7 +2751,8 @@ int wolfTPM2_ExportPublicKeyBuffer(WOLFTPM2_DEV* dev, WOLFTPM2_KEY* tpmKey,
/* determine the type of key in WOLFTPM2_KEY */
if (tpmKey->pub.publicArea.type == TPM_ALG_ECC) {
#ifdef HAVE_ECC
#if defined(HAVE_ECC) && \
defined(HAVE_ECC_KEY_IMPORT) && defined(HAVE_ECC_KEY_EXPORT)
rc = wc_ecc_init(&key.ecc);
if (rc == 0) {
/* load public portion of key into wolf ECC Key */