• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _FIPS_H
3 #define _FIPS_H
4 
5 #ifdef BUILD_FIPS140_KO
6 /*
7  * In fips140.ko, enable the behavior that the upstream fips_enabled flag
8  * controls, such as the XTS weak key check.
9  */
10 #define fips_enabled 1
11 #define CONFIG_CRYPTO_FIPS 1
12 
13 #elif defined(CONFIG_CRYPTO_FIPS)
14 extern int fips_enabled;
15 extern struct atomic_notifier_head fips_fail_notif_chain;
16 
17 void fips_fail_notify(void);
18 
19 #else
20 #define fips_enabled 0
21 
fips_fail_notify(void)22 static inline void fips_fail_notify(void) {}
23 
24 #endif
25 
26 #endif
27