Skip to content

Commit

Permalink
crypto: testmgr - Catch base cipher self-test failures in fips mode
Browse files Browse the repository at this point in the history
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 e08ca2d commit 941fb32
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crypto/testmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2220,7 +2220,8 @@ int alg_test(const char *driver, const char *alg, u32 type, u32 mask)
if (i < 0)
goto notest;

return alg_test_cipher(alg_test_descs + i, driver, type, mask);
rc = alg_test_cipher(alg_test_descs + i, driver, type, mask);
goto test_done;
}

i = alg_find_test(alg);
Expand All @@ -2229,6 +2230,7 @@ int alg_test(const char *driver, const char *alg, u32 type, u32 mask)

rc = alg_test_descs[i].test(alg_test_descs + i, driver,
type, mask);
test_done:
if (fips_enabled && rc)
panic("%s: %s alg self test failed in fips mode!\n", driver, alg);

Expand Down

0 comments on commit 941fb32

Please sign in to comment.