mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
linuxkm/module_hooks.c: fix whitespace, and update code around WOLFCRYPT_FIPS_CORE_DYNAMIC_HASH_VALUE and updateFipsHash().
This commit is contained in:
@ -25,6 +25,8 @@
|
||||
|
||||
#define FIPS_NO_WRAPPERS
|
||||
|
||||
#define WOLFSSL_NEED_LINUX_CURRENT
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
@ -100,9 +102,12 @@ static void lkmFipsCb(int ok, int err, const char* hash)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(WOLFCRYPT_FIPS_CORE_DYNAMIC_HASH_VALUE) && !defined(CONFIG_MODULE_SIG)
|
||||
#ifdef WOLFCRYPT_FIPS_CORE_DYNAMIC_HASH_VALUE
|
||||
#ifndef CONFIG_MODULE_SIG
|
||||
#error WOLFCRYPT_FIPS_CORE_DYNAMIC_HASH_VALUE requires a CONFIG_MODULE_SIG kernel.
|
||||
#endif
|
||||
static int updateFipsHash(void);
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
|
||||
static int __init wolfssl_init(void)
|
||||
@ -123,6 +128,13 @@ static int wolfssl_init(void)
|
||||
".\n");
|
||||
return -ECANCELED;
|
||||
}
|
||||
#ifdef WOLFCRYPT_FIPS_CORE_DYNAMIC_HASH_VALUE
|
||||
ret = updateFipsHash();
|
||||
if (ret < 0) {
|
||||
pr_err("wolfSSL module load aborted -- updateFipsHash: %s\n",wc_GetErrorString(ret));
|
||||
return -ECANCELED;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_WOLFSSL_LINUXKM_PIE_REDIRECT_TABLE
|
||||
|
Reference in New Issue
Block a user