
This is needed to meet a FIPS 140-3 requirement that modules provide a service that retrieves their name and versioning information. Bug: 188620248 Change-Id: I36049c839c4217e3616daab52ec536b46479c12a Signed-off-by: Eric Biggers <ebiggers@google.com> (cherry picked from commit 2888f960d09f3af00d1e45f1facd311ccd5b778a)
36 lines
950 B
C
36 lines
950 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright 2021 Google LLC
|
|
*/
|
|
|
|
#ifndef _CRYPTO_FIPS140_MODULE_H
|
|
#define _CRYPTO_FIPS140_MODULE_H
|
|
|
|
#include <linux/completion.h>
|
|
#include <linux/module.h>
|
|
|
|
#undef pr_fmt
|
|
#define pr_fmt(fmt) "fips140: " fmt
|
|
|
|
/*
|
|
* This is the name and version number of the module that are shown on the FIPS
|
|
* certificate. These don't necessarily have any relation to the filename of
|
|
* the .ko file, or to the git branch or commit ID.
|
|
*/
|
|
#define FIPS140_MODULE_NAME "Android Kernel Cryptographic Module"
|
|
#define FIPS140_MODULE_VERSION "v1.0"
|
|
|
|
#ifdef CONFIG_CRYPTO_FIPS140_MOD_ERROR_INJECTION
|
|
extern char *fips140_broken_alg;
|
|
#endif
|
|
|
|
extern struct completion fips140_tests_done;
|
|
extern struct task_struct *fips140_init_thread;
|
|
|
|
bool __init __must_check fips140_run_selftests(void);
|
|
|
|
bool fips140_is_approved_service(const char *name);
|
|
const char *fips140_module_version(void);
|
|
|
|
#endif /* _CRYPTO_FIPS140_MODULE_H */
|