Fix for building LMS with verify only. Added tests for LMS/XMSS verify only. New wc_LmsKey_GetKid references key->priv_raw that is not available.

This commit is contained in:
David Garske
2025-06-23 11:12:53 -07:00
parent b361c62372
commit d4c827bc5e
2 changed files with 6 additions and 1 deletions

View File

@ -55,7 +55,8 @@ jobs:
CPPFLAGS=''-DWC_RNG_SEED_CB -DWOLFSSL_NO_GETPID'' ',
'--enable-opensslextra CPPFLAGS=''-DWOLFSSL_NO_CA_NAMES'' ',
'--enable-opensslextra=x509small',
'CPPFLAGS=''-DWOLFSSL_EXTRA'' '
'CPPFLAGS=''-DWOLFSSL_EXTRA'' ',
'--enable-lms=small,verify-only --enable-xmss=small,verify-only'
]
name: make check
if: github.repository_owner == 'wolfssl'

View File

@ -1258,6 +1258,8 @@ int wc_LmsKey_Verify(LmsKey* key, const byte* sig, word32 sigSz,
return ret;
}
#ifndef WOLFSSL_LMS_VERIFY_ONLY
/* Get the Key ID from the LMS key.
*
* PRIV = Q | PARAMS | SEED | I
@ -1310,4 +1312,6 @@ const byte * wc_LmsKey_GetKidFromPrivRaw(const byte * priv, word32 privSz)
return priv + privSz - LMS_I_LEN;
}
#endif
#endif /* WOLFSSL_HAVE_LMS && WOLFSSL_WC_LMS */