diff --git a/wolfcrypt/src/ext_lms.c b/wolfcrypt/src/ext_lms.c index a991129ec5..70dfa5bd7a 100644 --- a/wolfcrypt/src/ext_lms.c +++ b/wolfcrypt/src/ext_lms.c @@ -27,7 +27,8 @@ #include #include -#ifdef WOLFSSL_HAVE_LMS +#if defined(WOLFSSL_HAVE_LMS) && defined(HAVE_LIBLMS) + #include #ifdef NO_INLINE @@ -1048,4 +1049,4 @@ int wc_LmsKey_Verify(LmsKey * key, const byte * sig, word32 sigSz, return 0; } -#endif /* WOLFSSL_HAVE_LMS */ +#endif /* WOLFSSL_HAVE_LMS && HAVE_LIBLMS */ diff --git a/wolfcrypt/src/ext_xmss.c b/wolfcrypt/src/ext_xmss.c index 14e3f71c97..938d5136d1 100644 --- a/wolfcrypt/src/ext_xmss.c +++ b/wolfcrypt/src/ext_xmss.c @@ -28,7 +28,8 @@ #include #include -#ifdef WOLFSSL_HAVE_XMSS +#if defined(WOLFSSL_HAVE_XMSS) && defined(HAVE_LIBXMSS) + #include #ifdef NO_INLINE @@ -1042,4 +1043,4 @@ int wc_XmssKey_Verify(XmssKey * key, const byte * sig, word32 sigLen, return ret; } -#endif /* WOLFSSL_HAVE_XMSS */ +#endif /* WOLFSSL_HAVE_XMSS && HAVE_LIBXMSS */ diff --git a/wolfssl/wolfcrypt/ext_lms.h b/wolfssl/wolfcrypt/ext_lms.h index 8be32bf5f7..41203351cf 100644 --- a/wolfssl/wolfcrypt/ext_lms.h +++ b/wolfssl/wolfcrypt/ext_lms.h @@ -22,12 +22,9 @@ #ifndef EXT_LMS_H #define EXT_LMS_H -#ifdef WOLFSSL_HAVE_LMS -#include +#if defined(WOLFSSL_HAVE_LMS) && defined(HAVE_LIBLMS) -#if !defined(HAVE_LIBLMS) -#error "This code requires liblms" -#endif +#include /* hash-sigs LMS HSS includes */ #include diff --git a/wolfssl/wolfcrypt/ext_xmss.h b/wolfssl/wolfcrypt/ext_xmss.h index 927ab6ed46..cb041bcb6e 100644 --- a/wolfssl/wolfcrypt/ext_xmss.h +++ b/wolfssl/wolfcrypt/ext_xmss.h @@ -22,12 +22,9 @@ #ifndef EXT_XMSS_H #define EXT_XMSS_H -#ifdef WOLFSSL_HAVE_XMSS -#include +#if defined(WOLFSSL_HAVE_XMSS) && defined(HAVE_LIBXMSS) -#if !defined(HAVE_LIBXMSS) - #error "This code requires libxmss" -#endif +#include #include #include