mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
crypto: proc - Print fips status
As FIPS may disable algorithms it is useful to show their status in /proc/crypto. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
bcdda4301b
commit
c43cc8823d
1 changed files with 6 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
||||||
#include <linux/atomic.h>
|
#include <linux/atomic.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/crypto.h>
|
#include <linux/crypto.h>
|
||||||
|
#include <linux/fips.h>
|
||||||
#include <linux/module.h> /* for module_name() */
|
#include <linux/module.h> /* for module_name() */
|
||||||
#include <linux/rwsem.h>
|
#include <linux/rwsem.h>
|
||||||
#include <linux/proc_fs.h>
|
#include <linux/proc_fs.h>
|
||||||
|
@ -48,6 +49,11 @@ static int c_show(struct seq_file *m, void *p)
|
||||||
seq_printf(m, "internal : %s\n",
|
seq_printf(m, "internal : %s\n",
|
||||||
(alg->cra_flags & CRYPTO_ALG_INTERNAL) ?
|
(alg->cra_flags & CRYPTO_ALG_INTERNAL) ?
|
||||||
"yes" : "no");
|
"yes" : "no");
|
||||||
|
if (fips_enabled) {
|
||||||
|
seq_printf(m, "fips : %s\n",
|
||||||
|
(alg->cra_flags & CRYPTO_ALG_FIPS_INTERNAL) ?
|
||||||
|
"no" : "yes");
|
||||||
|
}
|
||||||
|
|
||||||
if (alg->cra_flags & CRYPTO_ALG_LARVAL) {
|
if (alg->cra_flags & CRYPTO_ALG_LARVAL) {
|
||||||
seq_printf(m, "type : larval\n");
|
seq_printf(m, "type : larval\n");
|
||||||
|
|
Loading…
Reference in a new issue