mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 18:30:48 +02:00
Automatically turn on LMS / XMSS full hash
When WOLFSSL_NO_HASH_RAW is definied due to hardware hash offload, turn on LMS anx XMSS full hash. Without this they will not compile automatically when there is hardware SHA acceleration.
This commit is contained in:
@@ -95,6 +95,12 @@
|
||||
#include <wolfssl/wolfcrypt/lms.h>
|
||||
#include <wolfssl/wolfcrypt/sha256.h>
|
||||
|
||||
/* When hash struct internals are not accessible (hardware SHA acceleration),
|
||||
* fall back to full hash API calls. */
|
||||
#if defined(WOLFSSL_NO_HASH_RAW) && !defined(WC_LMS_FULL_HASH)
|
||||
#define WC_LMS_FULL_HASH
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_LMS_MAX_LEVELS
|
||||
/* Maximum number of levels of trees supported by implementation. */
|
||||
#define LMS_MAX_LEVELS WOLFSSL_LMS_MAX_LEVELS
|
||||
|
||||
@@ -34,6 +34,12 @@
|
||||
#include <wolfssl/wolfcrypt/sha512.h>
|
||||
#include <wolfssl/wolfcrypt/sha3.h>
|
||||
|
||||
/* When hash struct internals are not accessible (hardware SHA acceleration),
|
||||
* fall back to full hash API calls. */
|
||||
#if defined(WOLFSSL_NO_HASH_RAW) && !defined(WC_XMSS_FULL_HASH)
|
||||
#define WC_XMSS_FULL_HASH
|
||||
#endif
|
||||
|
||||
#if !defined(WOLFSSL_WC_XMSS)
|
||||
#error "This code is incompatible with external implementation of XMSS."
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user