Skip to content

Commit

Permalink
crypto: testmgr - Print self-test pass notices in fips mode
Browse files Browse the repository at this point in the history
According to our FIPS CAVS testing lab guru, when we're in fips mode,
we must print out notices of successful self-test completion for
every alg to be compliant.

New and improved v2, without strncmp crap. Doesn't need to touch a flag
though, due to not moving the notest label around anymore.

Applies atop '[PATCH v2] crypto: catch base cipher self-test failures
in fips mode'.

Personally, I wouldn't mind seeing this info printed out regardless of
whether or not we're in fips mode, I think its useful info, but will
stick with only in fips mode for now.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
jarodwilson authored and herbertx committed Jun 2, 2009
1 parent 941fb32 commit 29ecd4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crypto/testmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2234,6 +2234,10 @@ int alg_test(const char *driver, const char *alg, u32 type, u32 mask)
if (fips_enabled && rc)
panic("%s: %s alg self test failed in fips mode!\n", driver, alg);

if (fips_enabled && !rc)
printk(KERN_INFO "alg: self-tests for %s (%s) passed\n",
driver, alg);

return rc;

notest:
Expand Down

0 comments on commit 29ecd4a

Please sign in to comment.