Skip to content

Commit 003ea8b

Browse files
authored
Merge pull request #7868 from dgarske/pq_xms_lmss
Fixes for building wolfBoot sources for PQ LMS/XMSS
2 parents 14254e8 + 01eaa56 commit 003ea8b

4 files changed

Lines changed: 10 additions & 14 deletions

File tree

wolfcrypt/src/ext_lms.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
#include <wolfssl/wolfcrypt/error-crypt.h>
2828
#include <wolfssl/wolfcrypt/logging.h>
2929

30-
#ifdef WOLFSSL_HAVE_LMS
30+
#if defined(WOLFSSL_HAVE_LMS) && defined(HAVE_LIBLMS)
31+
3132
#include <wolfssl/wolfcrypt/ext_lms.h>
3233

3334
#ifdef NO_INLINE
@@ -1048,4 +1049,4 @@ int wc_LmsKey_Verify(LmsKey * key, const byte * sig, word32 sigSz,
10481049
return 0;
10491050
}
10501051

1051-
#endif /* WOLFSSL_HAVE_LMS */
1052+
#endif /* WOLFSSL_HAVE_LMS && HAVE_LIBLMS */

wolfcrypt/src/ext_xmss.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
#include <wolfssl/wolfcrypt/logging.h>
2929
#include <wolfssl/wolfcrypt/sha256.h>
3030

31-
#ifdef WOLFSSL_HAVE_XMSS
31+
#if defined(WOLFSSL_HAVE_XMSS) && defined(HAVE_LIBXMSS)
32+
3233
#include <wolfssl/wolfcrypt/ext_xmss.h>
3334

3435
#ifdef NO_INLINE
@@ -1042,4 +1043,4 @@ int wc_XmssKey_Verify(XmssKey * key, const byte * sig, word32 sigLen,
10421043
return ret;
10431044
}
10441045

1045-
#endif /* WOLFSSL_HAVE_XMSS */
1046+
#endif /* WOLFSSL_HAVE_XMSS && HAVE_LIBXMSS */

wolfssl/wolfcrypt/ext_lms.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@
2222
#ifndef EXT_LMS_H
2323
#define EXT_LMS_H
2424

25-
#ifdef WOLFSSL_HAVE_LMS
26-
#include <wolfssl/wolfcrypt/lms.h>
25+
#if defined(WOLFSSL_HAVE_LMS) && defined(HAVE_LIBLMS)
2726

28-
#if !defined(HAVE_LIBLMS)
29-
#error "This code requires liblms"
30-
#endif
27+
#include <wolfssl/wolfcrypt/lms.h>
3128

3229
/* hash-sigs LMS HSS includes */
3330
#include <hss.h>

wolfssl/wolfcrypt/ext_xmss.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@
2222
#ifndef EXT_XMSS_H
2323
#define EXT_XMSS_H
2424

25-
#ifdef WOLFSSL_HAVE_XMSS
26-
#include <wolfssl/wolfcrypt/xmss.h>
25+
#if defined(WOLFSSL_HAVE_XMSS) && defined(HAVE_LIBXMSS)
2726

28-
#if !defined(HAVE_LIBXMSS)
29-
#error "This code requires libxmss"
30-
#endif
27+
#include <wolfssl/wolfcrypt/xmss.h>
3128

3229
#include <xmss.h>
3330
#include <params.h>

0 commit comments

Comments
 (0)