diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-04-22 11:28:46 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-04-23 14:18:07 +0800 |
commit | 74c02aa0ec083bdf55dc43b2a2e7da3f7dbfb7ad (patch) | |
tree | 49e52f866dcb07ce8fdb9cb74f3f426e35ed5d39 | |
parent | f4f9a253e6b913eb5c2f1c11a1c99cfdb97cd2bd (diff) | |
download | linux-crypto-74c02aa0ec083bdf55dc43b2a2e7da3f7dbfb7ad.tar.gz linux-crypto-74c02aa0ec083bdf55dc43b2a2e7da3f7dbfb7ad.zip |
crypto: api - Move module sig ifdef into accessor function
Currently we're hiding mod->sig_ok under an ifdef in open code.
This patch adds a module_sig_ok accessor function and removes that
ifdef.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r-- | crypto/algapi.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index a60f6262..f835f439 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -43,12 +43,9 @@ static inline int crypto_set_driver_name(struct crypto_alg *alg) static inline void crypto_check_module_sig(struct module *mod) { -#ifdef CONFIG_CRYPTO_FIPS - if (fips_enabled && mod && !mod->sig_ok) + if (fips_enabled && mod && !module_sig_ok(mod)) panic("Module %s signature verification failed in FIPS mode\n", mod->name); -#endif - return; } static int crypto_check_alg(struct crypto_alg *alg) |