diff --git a/wolfcrypt/src/wc_lms.c b/wolfcrypt/src/wc_lms.c index be78da87b2..109a53dcf1 100644 --- a/wolfcrypt/src/wc_lms.c +++ b/wolfcrypt/src/wc_lms.c @@ -1529,7 +1529,13 @@ int wc_LmsKey_ExportPub_ex(LmsKey* keyDst, const LmsKey* keySrc, */ int wc_LmsKey_ExportPub(LmsKey* keyDst, const LmsKey* keySrc) { - return wc_LmsKey_ExportPub_ex(keyDst, keySrc, NULL, INVALID_DEVID); + return wc_LmsKey_ExportPub_ex(keyDst, keySrc, + #ifndef WOLFSSL_LMS_VERIFY_ONLY + (keySrc != NULL) ? keySrc->heap : NULL, + #else + NULL, + #endif + INVALID_DEVID); } /* Exports the raw LMS public key buffer from key to out buffer. diff --git a/wolfcrypt/src/wc_xmss.c b/wolfcrypt/src/wc_xmss.c index ed32503fa1..b236e6ad89 100644 --- a/wolfcrypt/src/wc_xmss.c +++ b/wolfcrypt/src/wc_xmss.c @@ -1798,15 +1798,12 @@ int wc_XmssKey_GetSigLen(const XmssKey* key, word32* len) int wc_XmssKey_Verify(XmssKey* key, const byte* sig, word32 sigLen, const byte* m, int mLen) { - int ret = 0; + int ret = 0; /* Validate parameters. */ if ((key == NULL) || (sig == NULL) || (m == NULL)) { ret = BAD_FUNC_ARG; } - if ((ret == 0) && (mLen <= 0)) { - ret = BAD_FUNC_ARG; - } /* Validate state. */ if ((ret == 0) && (key->state != WC_XMSS_STATE_OK) && (key->state != WC_XMSS_STATE_VERIFYONLY)) {